是否有一个基本的php方法接受一个URL并从头部检索上次修改的日期?
这似乎是php可以做的事情,但我不确定要检查哪个对象.
谢谢
让这个去..用卷曲.
$c = curl_init('http://...'); curl_setopt($c, CURLOPT_HEADER, 1); // Include the header curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); // Return the result instead of printing it $result = curl_exec($c); if (curl_errno($c)) die(curl_error($c)); // $result now contains the response, including the headers if (preg_match('/Last-Modified:(.*?)/i', $result, $matches)) var_dump($matches[1]);