Check last modifed from remote file's header in case of IIS
Why does IIS not return a last modified time date for a file?
Array (
[headers] => Array (
开发者_开发技巧 [Date] => Sun, 09 Oct 2011 08:57:43 GMT
[Server] => Microsoft-IIS/6.0
[X-Powered-By] => ASP.NET
[X-AspNet-Version] => 2.0.50727
[Location] => /home.aspx
[Cache-Control] => private
[Content-Type] => text/html; charset=iso-8859-1
[Content-Length] => 129
)
[info] => Array (
[url] => http://www.adleradelboden.ch/webcam/Adler000.JPG
[content_type] => text/html; charset=iso-8859-1
[http_code] => 302
[header_size] => 250
[request_size] => 220
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.077872
[namelookup_time] => 0.041748
[connect_time] => 0.058456
[pretransfer_time] => 0.058463
[size_upload] => 0
[size_download] => 129
[speed_download] => 1656
[speed_upload] => 0
[download_content_length] => 129
[upload_content_length] => 0
[starttransfer_time] => 0.077829
[redirect_time] => 0
[certinfo] => Array ( )
)
[curl_handle] => Resource id #5
)
Response headers for http://www.adleradelboden.ch/webcam/Adler000.JPG
:
HTTP/1.1 200 OK
Content-Length: 59080
Content-Type: image/jpeg
Last-Modified: Sun, 09 Oct 2011 09:32:42 GMT
Accept-Ranges: bytes
ETag: "d7df1646686cc1:d2487"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Sun, 09 Oct 2011 09:40:24 GMT
There is Last-Modified header.
You have not shown us how do you get this info. But by looking at headers you receive, there is Location
header so your request is being redirected. You should set curl to follow location
精彩评论