Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
PHPNuke Blocks
CNN RSS Feed available, now in PHP!

Posted on Friday, June 06, 2003 @ 15:05:07 CDT
Well, for those of you that downloaded the PERL version of the CNN RSS news feed, but had trouble (your ISP didn't allow PERL scripts, etc), the solution is here...

This is a simple PHP script (get it here) that will scan CNN for the latest headlines and print each section to an XML file:
  • CNN_BUSINESS_from_CNNmoney.com.xml
  • CNN_SPORTS_from_SI.com.xml
  • CNN_WEATHER.xml
  • CNN_ENTERTAINMENT.xml
  • CNN_TECHNOLOGY.xml
  • CNN_WORLD.xml
  • CNN_HEALTH.xml
  • CNN_TOP_STORIES.xml
  • CNN_POLITICS.xml
  • CNN_TRAVEL.xml
  • CNN_SPACE.xml
  • CNN_US.xml
To use it, simply put the file in your home directory (preferably not in your web site directory), and alter the following line:
var $XML_DIRECTORY = "/home/httpd/htdocs/CNN/";

Change that value to whatever directory in which you want to have your XML files stored (make sure the directory is inside your web page directory, and that you create it before running the script). To use it, simply create a cron job ("crontab -e") to execute this PHP script at a given interval. To have it execute every 30 minutes, you'd type:
*/30 * * * * PHP /your_directory/myRSS.php

That's it. Now, just create a new block, and make it read the XML file for the news headlines.
· More about Misc PHP Nuke Stuff
· News by dari


Most read story about Misc PHP Nuke Stuff:
CNN RSS Feed available, now in PHP!


Average Score: 3.33
Votes: 3


Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad



 Printer Friendly Printer Friendly

 Send to a Friend Send to a Friend



Re: CNN RSS Feed available, now in PHP! (Score: 1)
by tkevans on Wednesday, June 11, 2003 @ 09:38:53 CDT
(User Info | Send a Message) http://www.tkevans.com/
Why does the "read more..." add-on that's stuck on each feed block point to docroot on the server? How can it be changed? Suppressed?



Re: CNN RSS Feed available, now in PHP! (Score: 1)
by Ogdenous on Friday, June 13, 2003 @ 12:17:06 CDT
(User Info | Send a Message)
Newbie help. I am now PHP savvy. I was wondering how to get this to work in phpnuke. I put file in website and added the directory, then created a block, but block says:
CNN
There isn't content right now for this block.

What am I doing wrong?





Sponsors: Dedicated ServersDomain NamesWeb HostingDomain Name RegistrationAustralian Web HostingNeckermannLook For GadgetsSwag Listings

10th year online! 2003-2013
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia