cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: curl/php & CURLOPT_TIMEVALUE

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 22 Apr 2002 10:01:03 +0200 (MET DST)

On Sun, 21 Apr 2002, Robert Olson wrote:

> $date = "1 january 2004";
> $time = strtotime($date);

[snip]

> $rc = curl_setopt($ch, CURLOPT_TIMEVALUE, $time);
>
> $cont = curl_exec($ch);
>
> curl_close($ch);
>
> And find that I always get the full page returned in $cont.
>
> the date is parsing correctly (as verified by strftime later); a similar
> request done thru the curl command line utility works properly. Is there
> something I'm missing?

Set CURLOPT_TIMECONDITION to TIMECOND_IFMODSINCE or similar. The docs says we
default to this comparision, but I'm not so sure that is actually true...

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-04-22