Re: Remote Files using PHP: Help Please
| From: | Anthony Ritter | Date: | Sun, 15 Sep 2002 22:45:39 +0000 |
| Subject: | Re: Remote Files using PHP: Help Please | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116468@lists.php.net to get a copy of this message | ||
Thanks John.
Two questions:
In the php function
eregi()
it seems that you can use html markup to begin the pattern match.
As in the snippet listed below:
........................................
"<!-- start of data table -->(.*)<HR>",
........................................
which roughly translates to:
eregi (<!--start data table--> // match the string that begins with the
html markup source code <!--start data table -->
(.*) // and continue each character until...
<HR> // the html code <HR> is reached.
Correct?
The other question:
Can the font type and font size for that output be changed in say a smaller
typesize an typeface?
Thank you for your time.
Tony Ritter
................................................................
<?
$fp =
fopen("http://waterdata.usgs.gov/ny/nwis/current?type=sw&group_key=huc_cd&se
arch_site_no_station_nm=01427510","r");
$content = fread($fp,100000);
eregi("<!-- start of data table -->(.*)<HR>",$content,$match);
echo $match[1];
?>
.....................................................................
John Holmes wrote in message:
> Here, this will get the data table for you. Adapt to your needs:
>
> <?
> $fp =
>
> fopen("http://waterdata.usgs.gov/ny/nwis/current?type=sw&group_key=huc_c
> d&search_site_no_station_nm=01427510","r");
>
> $content = fread($fp,100000);
>
> eregi("<!-- start of data table -->(.*)<HR>",$content,$match);
>
> echo $match[1];
>
> ?>
>
> This depends on them not changing the layout of the page, too.
>
> ---John Holmes...