Need help with fsockopen()
| From: | Cliff Small | Date: | Fri, 04 Oct 2002 21:19:55 +0000 |
| Subject: | Need help with fsockopen() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-118900@lists.php.net to get a copy of this message | ||
I have a script that downloads html pages from many different sites. The
script executes as expected but is sloooooooow. 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, 50000);
Simply put, how do I do the exact same thing as above with fsockopen().
Thanks,
Cliff