I'm returning a -1 on timestamp, I'll save us the time by placing the code:
Any ideas on why that would return a -1?
- "Delightfully confusing..." raves The New York Times
-kas
Code:
$modded = last_mod("localhost/submitted.php");
function last_mod($remote_file) {
$ch = curl_init();
$ret = curl_setopt($ch, CURLOPT_URL, $remote_file);
$ret = curl_setopt($ch, CURLOPT_HEADER, 1);
$ret = curl_setopt($ch, CURLOPT_NOBODY, 1);
$ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$ret = curl_setopt($ch, CURLINFO_FILETIME, 1);
$ret = curl_exec($ch);
if(empty($ret)) {
die(curl_error($ch));
curl_close($ch);
} else {
$info = curl_getinfo($ch);
$file = $info['filetime'];
curl_close($ch);
return $file;
}
}
Any ideas on why that would return a -1?
- "Delightfully confusing..." raves The New York Times
-kas