PHP is open source scripting language. It\'s widely used to develop web applications.  Home Web Programming PHP Displaying RSS Feeds in Text

Displaying RSS Feeds in Text


Good afternoon everyone, today il be taking you through the steps of modifying your feed count. Ive had loads of e-mails asking how i designed my "stay connected" box and how i displayed my RSS count as pure text and not a feed burner image.

To display your feedburner RSS count as text we need to just add two snippets of code to our website. Open up a blank notepad document copy and paste the code below.

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

//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 feedburner count

Where "hv-designs" is in the 1st bif of code, change that to your feed. Save the blank notepad document as "rss.php", save it in the root of your websites directory. Now copy and paste the code below.

<?php include("rss.php"); ?>

Paste it any where inside the body of your website. Now all you need to do is add the code below.

<?php echo $fb;?>

Then paste it inside your website where you want the RSS count to be.



Author's URL: Hv-Designs.co.uk
PHP is open source scripting language. It\'s widely used to develop web applications. More PHP Tutorials: Featured Materials | Fresh Materials | More PHP Tutorials at LearnPHP.org

Reader's comments
comments CrossAURELIA27 September 03, 2011 says:
Do you understand that it is correct time to get the <a href=">, which would make your dreams come true.
Reply
comments 609610 August 27, 2011 says:

Reply
comments jfetwx August 19, 2011 says:
9iMF8O , [url=], [link=],
Reply
comments qreiaxztqv August 14, 2011 says:
Nw4N4J <a href=">
Reply
comments txhrjtfxfef August 13, 2011 says:
61AC5z , [url=], [link=],
Reply
comments lvhwfiwx August 11, 2011 says:
J6bVk4 <a href=">
Reply
comments Janaye August 11, 2011 says:
Now we know who the snesilbe one is here. Great post!
Reply
comments TEST October 15, 2010 says:
Hi TEST
Reply
Add comments to "Displaying RSS Feeds in Text"

Captcha