[thelist] Using PHP to read and cache XML feed
michael ensor
edc at wnc.quik.co.nz
Sun Oct 22 14:38:46 CDT 2006
----- Original Message -----
From: "Pringle, Ron"
To: <thelist at lists.evolt.org>
Sent: Saturday, October 21, 2006 7:52 AM
Subject: Re: [thelist] Using PHP to read and cache XML feed
: Basically I'm checking if a file exists, if it doesn't I create it and
: write data to it from an external XML file located on the National
: Weather Service's site. If it does exist, I check to see if it is an
: hour or more old, and if it is I overwrite it with new data. If not, I
: use the existing file.
:
: Currently I'm just doing an XSL transformation on the XML file, but I
: may try to step through it in PHP and output it that way.
:
: I may also try to implement caching of the data once it is local, since
: it will get called over and over again and the data only changes once
: per hour.
:
: So, in looking over the code I have below, is there a better way to do
: it, or anything that I have missed?
There is a PEAR class that will do all that you want, including caching..
written specifically for transformation of airport weather reports
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.0.408 / Virus Database: 268.13.9/490 - Release Date: 20/10/06
More information about the thelist
mailing list