Graphic Design Forum | GraphicsCode.net
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Displaying RSS Feeds As Text

2 posters

Go down

Displaying RSS Feeds As Text Empty Displaying RSS Feeds As Text

Post by Kasperx 2009-11-23, 23:22

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/
Kasperx
Kasperx
Global Moderator
Global Moderator

Male Posts : 567
Join date : 2009-10-05

http://elite-gfx.forumotion.com/

Back to top Go down

Displaying RSS Feeds As Text Empty Re: Displaying RSS Feeds As Text

Post by anonymous#1 2009-11-24, 00:01

wats that for??
anonymous#1
anonymous#1
Active Member
Active Member

Female Posts : 464
Join date : 2009-10-14

Back to top Go down

Displaying RSS Feeds As Text Empty Re: Displaying RSS Feeds As Text

Post by Kasperx 2009-11-24, 09:46

For Displaying RSS Feeds As Text that means displaying whats here: http://www.graphicscode.net/rss/ as text in your forum/web.
Kasperx
Kasperx
Global Moderator
Global Moderator

Male Posts : 567
Join date : 2009-10-05

http://elite-gfx.forumotion.com/

Back to top Go down

Displaying RSS Feeds As Text Empty Re: Displaying RSS Feeds As Text

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum