Re: Remote Files using PHP: Help Please

From: Date: Sun, 15 Sep 2002 18:59:51 +0000
Subject: Re: Remote Files using PHP: Help Please
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-116449@lists.php.net to get a copy of this message
Thanks for the reply John. Please let me explain further... The following is the URL: http://waterdata.usgs.gov/ny/nwis/current?type=sw&group_key=huc_cd&search_si te_no_station_nm=01427510 On that page there is a real time table of water heights and water temperatures which get updated every four hours. However, if I use fread(), then all of the data gets transferred. Everything on the page. I'd like only the following string: Station Number | Station Name | Date | Time | Gage Height | Temperature 01427510 | Callicoon, New York | 09/15 | 13:15 | 2.92 | 19.5 Is it possible to filter out *everything* but the data for the above record? From there I would assume I could place this data into an array e.g. '$station_number'[] '$station_name'[] '$date'[] $time'[] $gage_height'[] $'temperature'[] so that this data could be placed into a html cell within the the table for output. Please advise. Thank you. Tony Ritter ......................................................... John Holmes wrote in message: > Just treat the URL like a local file: > > $fp = fopen("http://www.domain.com/file.html"); > > and then fread() and parse the contents of the file. > > ---John Holmes... >

« previous php.general (#116449) next »