Create a FREE account or Login
As a guest, you don't have access to our FULL navigation system. |
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:
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.
Average Score: 3.33|
|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:|
There isn't content right now for this block.
What am I doing wrong?