Displaying RSS Feeds As Text
Graphic Design Forum | GraphicsCode.net :: Graphic Design and Web Design Forums :: Scripts and Coding :: Markup and Style-Sheet Languages
Page 1 of 1 • Share •
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/
Vote Elite-Gfx http://gameart-top.net84.net/in.php?wid=314
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.
Vote Elite-Gfx http://gameart-top.net84.net/in.php?wid=314

» Need to do a simple Left Click in a text box
» Command for auto populated text verification.
» How to return the focus to original frame after entering text in tinymce?
» count of text
» How to select a text in iFrame and bold it?
» Command for auto populated text verification.
» How to return the focus to original frame after entering text in tinymce?
» count of text
» How to select a text in iFrame and bold it?
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
|
|