curl-and-php
curl/php & CURLOPT_TIMEVALUE
Date: Sun, 21 Apr 2002 22:54:37 -0500
Hi --
I'm trying to get a conditional page-fetch working in php. I'm doing this:
$ch = curl_init("http://cnn.com/");
$date = "1 january 2004";
$time = strtotime($date);
$rc = curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$rc = curl_setopt($ch, CURLOPT_VERBOSE, 1);
$rc = curl_setopt($ch, CURLOPT_FAILONERROR, 1);
$rc = curl_setopt($ch, CURLOPT_HEADER, 1);
$rc = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$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?
thanks,
--bob
Received on 2002-04-22