Displaying RSS Feeds As Text
2 posters
Graphic Design Forum | GraphicsCode.net :: Graphic Design and Web Design Forums :: Scripts and Coding :: Markup and Style-Sheet Languages
Page 1 of 1
Displaying RSS Feeds As Text
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.
01.<?php
02.//get feedburner count
03.$whaturl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=hvdesigns";
04.
05.//Initialize the Curl session
06.$ch = curl_init();
07.
08.//Set curl to return the data instead of printing it to the browser.
09.curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
10.
11.//Set the URL
12.curl_setopt($ch, CURLOPT_URL, $whaturl);
13.
14.//Execute the fetch
15.$data = curl_exec($ch);
16.
17.//Close the connection
18.curl_close($ch);
19.$xml = new SimpleXMLElement($data);
20.$fb = $xml->feed->entry['circulation'];
21.//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.
1.<?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.
1.<?php echo $fb;?>
Then paste it inside your website where you want the RSS count to be.
Source: http://hv-designs.co.uk/2009/03/16/displaying-rss-feeds-in-text/
01.<?php
02.//get feedburner count
03.$whaturl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=hvdesigns";
04.
05.//Initialize the Curl session
06.$ch = curl_init();
07.
08.//Set curl to return the data instead of printing it to the browser.
09.curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
10.
11.//Set the URL
12.curl_setopt($ch, CURLOPT_URL, $whaturl);
13.
14.//Execute the fetch
15.$data = curl_exec($ch);
16.
17.//Close the connection
18.curl_close($ch);
19.$xml = new SimpleXMLElement($data);
20.$fb = $xml->feed->entry['circulation'];
21.//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.
1.<?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.
1.<?php echo $fb;?>
Then paste it inside your website where you want the RSS count to be.
Source: http://hv-designs.co.uk/2009/03/16/displaying-rss-feeds-in-text/
Re: Displaying RSS Feeds As Text
wats that for??
anonymous#1- Active Member
- Posts : 464
Join date : 2009-10-14
Re: Displaying RSS Feeds As Text
For Displaying RSS Feeds As Text that means displaying whats here: http://www.graphicscode.net/rss/ as text in your forum/web.
Similar topics
» Marquee text problem...
» 114 Photoshop Text Effects Tutorials
» 30 Awesome Photoshop Text Tutorials
» David is Required: changing positions and text colors?
» 114 Photoshop Text Effects Tutorials
» 30 Awesome Photoshop Text Tutorials
» David is Required: changing positions and text colors?
Graphic Design Forum | GraphicsCode.net :: Graphic Design and Web Design Forums :: Scripts and Coding :: Markup and Style-Sheet Languages
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum