Quantcast
Viewing all articles
Browse latest Browse all 17

Google Feed Abone Sayısını Metin olarak Göstermek

Image may be NSFW.
Clik here to view.

Feedburner Abone Sayısını Metin olarak Göstermek adlı yazımıza ek olarak Google Feed Abone Sayısını Metin olarak Göstermek adlı bir yazıyı da gerekli buldum.

Feedburner için Gerekli olan Eski Kod

Aşağıdaki kod Feedburner için, birazdan Google Feed’e uyumlu hale getirmek için ekleme yapacağız.

//get cool feedburner count
$whaturl="http://api.feedburner.com/awareness/1.0/GetFeedData?uri=rsskitap";

//Initialize the Curl session
$ch = curl_init();

//Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

//Set the URL
curl_setopt($ch, CURLOPT_URL, $whaturl);

//Execute the fetch
$data = curl_exec($ch);

//Close the connection
curl_close($ch);
$xml = new SimpleXMLElement($data);
$fb = $xml->feed->entry['circulation'];
//end get cool feedburner count

Google Feed için Çözüm

Aşağıdaki satır:2 ‘yi düzenleyeceğiz

//get cool feedburner count
$whaturl="http://api.feedburner.com/awareness/1.0/GetFeedData?uri=rsskitap";

Üzerine yapıştıracağımız kod;

//get cool feedburner count
$whaturl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=rsskitap";

Sonuç

Sonuç olarak kodumuz aşağıdaki hali aldı.

//get cool feedburner count
$whaturl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=rsskitap";

//Initialize the Curl session
$ch = curl_init();

//Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

//Set the URL
curl_setopt($ch, CURLOPT_URL, $whaturl);

//Execute the fetch
$data = curl_exec($ch);

//Close the connection
curl_close($ch);
$xml = new SimpleXMLElement($data);
$fb = $xml->feed->entry['circulation'];
//end get cool feedburner count

İşe Yaramazsa

  • rsskitap yazan yerleri kendi feedburner kimliğinizle değiştirdiniz mi?
  • http://api.feedburner.com/awareness/1.0/GetFeedData?uri=feedburner-id ile https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=feedburner-id arasındaki farkı oluşturduğunuzdan emin olun.
  • SimpleXMLElement PHP5 gerektirir. Eğer sitenizi barındıran hosting firması PHP4 kullanıyorsa yükseltmeleri için iletişime geçmelisiniz

Viewing all articles
Browse latest Browse all 17

Trending Articles


Mide ağrısı için


Alessandra Torre - Karanlık Yalanlar


Şekilli süslü hazır floodlar


Flatcast Güneş ve Ay Flood Şekilleri


Gone Are the Days (2018) (ENG) (1080p)


Yildiz yükseltme


yc82


!!!!!!!!!! Amın !!!!!!!!!


Celp At Nalı (Sahih Tılsım)


SCCM 2012 Client Installation issue