Re: Using fopen() for internet URL
| From: | David Smith | Date: | Sun, 08 Jun 2003 23:58:44 +0000 |
| Subject: | Re: Using fopen() for internet URL | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28435@lists.php.net to get a copy of this message | ||
Tony S. Wu wrote:
I have an auto-update script to gather some information from other web pages to update information in my database. And i use fopen() to open the URL. as far as i know, the return result contains image, which i don't need.If you call fopen()/fread() on a web page that contains an image, you will _not_ get the image in your result. You will only get the HTML text of the web-page. For example: $f = fopen( 'http://www.google.com/', 'r' ); $page = fread( $f, 2048 ); fclose( $f ); // $page will _not_ contain the Google image logo, but rather just the text of the HTML page. --Dave