mpjones Posted May 26, 2006 Share Posted May 26, 2006 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 More sharing options...
mr.underperson Posted May 27, 2006 Share Posted May 27, 2006 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.GetAllResponseHeadersI got the GetAllResponseHeaders function form here (also quoted in the manual) ...http://msdn.microsoft.com/library/default....httprequest.aspNow 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 More sharing options...
mpjones Posted May 30, 2006 Author Share Posted May 30, 2006 Thanx that was what I was looking for, I now noticed that inetget doesnt keep the same date of the file. But it looks like i can use the httprequest to acomplish this as well. Link to comment Share on other sites More sharing options...
mr.underperson Posted May 31, 2006 Share Posted May 31, 2006 Yes, it's very useful. Note that dynamically generated pages always return "now" (or thereabouts) as the modified time, but for fixed documents, PDFs, regular HTML, etc, it's very reliable. -mu Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now