cURL / Mailing Lists / curl-users / Single Mail

curl-users

setting a max time for http downloads

From: Cliff Small <rusm71_at_bellsouth.net>
Date: Mon, 7 Oct 2002 02:07:17 -0700

I would like to set a max time for downloading web content. I've tried the following:

$ch = curl_init();
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_LOW_SPEED_TIME,3);
curl_setopt($ch, CURLOPT_URL,"$site_url");
ob_start();
curl_exec($ch);
curl_close($ch);

I'm testing my script for download times using microtime() and continue to get file downloads from 6 to 22 seconds. I want the script to skip the download if it takes longer than 3 seconds. What am I missing???

Thanks,
Cliff

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-07