Jump to content

Get the daate of a file on the internet?


Recommended Posts

I know you can use InetGetSize ( "URL" ). But i was wondering if there is a way to return the date that the file was created/modified? If there is a way I have been unable to figure it out. I am trying to check some pdf/chm files to see if they have changed and am currently using the InetGetSize ( "URL" ) function for that. Checking the date would be a guarentee of whether the pdf/chm has changed. The files size difference wiil not be 100%, maybe 99.9% but not 100%.

Thanx for any help.

Link to comment
Share on other sites

Based on the example from the COM reference part of the AutoIt manual...

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET","http://www.google.com/analytics/features.html")
$oHTTP.Send()
$HTTP_headers = $oHTTP.GetAllResponseHeaders

I got the GetAllResponseHeaders function form here (also quoted in the manual) ...

http://msdn.microsoft.com/library/default....httprequest.asp

Now the response headers are stored in "$HTTP_headers".

You can parse out the "Last-Modified:" part for your own evil ends.

-mu

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...