在IIS的情况下,检查上次从远程文件's头修改


Check last modifed from remote file's header in case of IIS

为什么IIS不返回文件的最后修改时间日期?

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
)

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

有Last-Modified头。

你还没有告诉我们你是如何得到这个信息的。但是通过查看您收到的标头,有Location标头,因此您的请求正在被重定向。您应该将curl设置为跟随location