1

私はかなり長い間 WordPress ベースの PHP 関数を使用して、Feedburner の購読者数を取得し、購読者数をテキストとして表示できるようにしています。

関数は次のとおりです。

/**
 * Fetch Feedburner RSS Feed Subscribers.
 *
 * @param string $feed The feed to fetch.
 * @return int of Feedburner RSS subscribers.
 */
public function get_feedburner_subcribers($feedburner_username){
    $xml = wp_remote_get('http://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=' .$feedburner_username);

    if(is_wp_error($xml))
        return false;

    try {
        $sxe = @new SimpleXMLElement($xml['body']);
    }
    catch (Exception $e) {
        // SimpleXMLElement::__construct produces an E_WARNING error message for
        // each error found in the XML data and throws an exception if errors
        // were detected. Catch any exception and return failure (NULL).
        return;
    }

    return self::format(intval($sxe->feed->entry['circulation']));
}

関数が値を返さなくなった最近まで、すべてがうまく機能していました。

URL を直接貼り付けるとhttp://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=my-feedburner-id、Google エラー 404 ページが表示されます。

Google は再び変更しましたか? もしそうなら、Feedburner カウントを取得する他の方法はありますか?

ありがとう

4

1 に答える 1

2

Feedburner API利用できなくなりました。2012 年 10 月 20 日に閉鎖されました (閉鎖日を含む詳細はこちら)。

于 2012-11-09T23:21:15.293 に答える