[PHP-DB] Using fopen() for internet URL

2003-06-08 Thread Tony S . Wu
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.
so is there anyway to disable loading image when using fopen() with URL?
just want to speed things up a bit :P
thanks.

Tony S. Wu
[EMAIL PROTECTED]
The world doesn't give us hope - it gives us chance.
http://homepage.mac.com/tonyswu/tonyswu- My web page.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Using fopen() for internet URL

2003-06-08 Thread David Smith
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



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Using fopen() for internet URL

2003-06-08 Thread Tony S . Wu
Thanks, i think i got the description mixed up :D

Tony S. Wu
[EMAIL PROTECTED]
The world doesn't give us hope - it gives us chance.
http://homepage.mac.com/tonyswu/tonyswu- My web page.
On Sunday, June 8, 2003, at 04:29 PM, 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.
so is there anyway to disable loading image when using fopen() with 
URL?
just want to speed things up a bit :P
thanks.

Tony S. Wu
[EMAIL PROTECTED]
The world doesn't give us hope - it gives us chance.
http://homepage.mac.com/tonyswu/tonyswu- My web page.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php