[PHP] Re: using fopen() to download remote files
Thanks for the help Gamin. I've been reading some posts and have noticed that lots of people are having the same problem as I. I'm using php 4.1.2 which came with redhat 7.3. I think that there was a bug in 4.1.2 regarding fopen() and unusually long delays with HTTP files. I may try and compile and install 4.2.3 and see if this resolves my problems. Your suggestions may not be suited for what I need to do as I think that writing to the disk would cause more overhead than I could live. Although it sounds very interesting. Thanks, Cliff "Rusty Small" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have written a script in which the main purpose is to download html pages > from multiple web servers. I'm using the fopen() function to download these > pages. I would like to be able to download only the source (text) and no > binary data as this would greatly improve the speed of my script. > > I've seen this on the client side with browsers being set to text only mode. > Is there a way to do this with php on the sever side to tell the remote web > server to not download the images associated a particular URL? I'm running > Red Hat 7.3 and Apache web server. > > Any help would be greatly appreciated. > > Cliff > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need help with fsockopen()
I have a script that downloads html pages from many different sites. The script executes as expected but is slw. I would like to replace fopen() with fsockopen() so that I can set a time limit for the page downloads. Here is an example of how I'm using fopen(): $OpenFile = fopen("$site_url", 80); //$site_url = www.domainname.com/complete/path/to/the/page.htm $getFile = fread($OpenFile, 5); Simply put, how do I do the exact same thing as above with fsockopen(). Thanks, Cliff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php