Re: Reading a web page as a text string
| From: | Richard Baskett | Date: | Fri, 16 Nov 2001 01:42:55 +0000 |
| Subject: | Re: Reading a web page as a text string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-74809@lists.php.net to get a copy of this message | ||
Well a person could do something like this:
<?
$file = "http://www.php.net/support.php";
$fcontents = htmlspecialchars(implode('', file ("$file")));
echo "<PRE>$fcontents</PRE>";
?>
All this will do is return the webpage as text so that you can read it in
your browser.
Rick
> HI Folks,
>
> How can I read a html page as a text file?
>
> I saw a demo of someone doing this on a Mac using AppleScript. The
> example sent a zip code as a variable attached to the remote site
> url. This resulted in a web page being sent back with the city and
> state info included. He then read the page as a text string, parsed
> out the city and state info and used it.
>
> How could this be done with PHP?
>
> I think the sending the url and zip code variable could easily be
> done with a <form>. How do you read the html page that is
> returned?????
>
> Any ideas. Thanks.
> --
>
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> Michael Seely 408-777-9949
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>