logo Click here for LLL Reptile & Supply
advertising rates - site news - help - contact
Looking for a pet? Try a rescue first!
click here to add your rescue
RSS News Feeds
[ 1 ] [ 4 ]
Incorporating our feeds in your site with PHP
You can download a pre-made PHP system here.

Unzip and Untar into the directory of your choice. We've added local cacheing to speed up delivery to your site and cut down on unnecessary traffic to our site. You will need to ensure that the "Cache" directory is writeable by your web server. On some systems you may need to change onwership to the process that runs your web server (i.e. chown www Cache) or issue a "chmod 775 Cache" command.

You will need to edit the main script, rss_reader.php, but only in this section:
// User configureable options below
//--------------------------------------------------------------

// See page 1 - Where are the feeds? - for the correct urls
$file = "http://www.petpress.net/news/headlines/rss/";

// Maximum number of articles to show
$items = 5;

// Include "Read full story" link? 1=Yes 0=No
$full_story_link = 0;

// Width of table
$tablewidth = 200;

//Cache Settings
$expire = 60 * 60 * 2; // 2 hours
$cachedir = "/web/php_rss/Cache/";

//-------------------------------------------------------------
// End options
At the very least, you will need to specify the full path to the Cache directory.

In your scripts, and easy way to pull in the data is like this:

if ($myfile = @fopen("./rss_reader.php",'r')) {
@fpassthru($myfile);
}
 
© 2003 OnlineHobbyist.com, Inc.
Employment | Advertising Rates | Contact | Support

NEW!!!     Other OnlineHobbyist.com Inc. sites...
ComputerHobbyist | CameraHobbyist | GuitarHobbyist | TerrariaHobbyist | FarmHobbyist | CraftHobbyist | WineHobbyist | BeerHobbyist | GolfHobbyist
KitHobbyist | RCHobbyist | RailroadHobbyist | DiecastHobbyist | CoinHobbyist | StampHobbyist | PatchHobbyist | CardHobbyist | StereoHobbyist