Re: How to get PHP to download web contents
| From: | Nadim Attari | Date: | Thu, 03 Jul 2003 07:19:00 +0000 |
| Subject: | Re: How to get PHP to download web contents | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29043@lists.php.net to get a copy of this message | ||
> How would you get PHP to download a file such as a web page and put it in
a string?
From the manual:
$html = implode ('', file ('http://www.example.com/'));
Note: As of PHP 4.3.0 you can use file_get_contents() to return the contents
of a file as a string.