Is there a way to check the date of a file on the net (changed, created and/or accessed)?
Printable View
Is there a way to check the date of a file on the net (changed, created and/or accessed)?
It's pretty easy if you use the Microsoft Internet Transfer Control.
Good luck!Code:'this returns the date and time the file
'was transfered.
Text1 = Inet1.GetHeader("Date")
'and this will get the date and time when
'the file was last modified
Text2 = Inet1.GetHeader("Last-modified")
So if I use the OpenURL method at 3:45 PM it will return this time?
And the "Last-modified": Will it return when the file was last modified on the internet or on my pc?
The Date header returns the date and time of the document's transmission. Using OpenURL doesn't tranfer a file.
Last-modified will return just that, when the file was last modified. If you modifiy a file on your PC at 3:45 PM and then transfer it to the Interner at 3:55 PM the Date header will have the date and 3:55 PM as the time and the Last-modified header will return the date and 3:45 PM as the time.
So if I want to check if a page was updated, I should use the "Last-modified"? (Sorry for bugging you Joacim)
Yupp, I would go with Last-modified.
Consider this: You have two copies of the same file. You edit one of them and after that transfer the other to the Net. If you now should read the Date header it would read a later date then the file you edited. But if you read the Last-modified header you should get a date that is earlier on the file you have on the Net then the local file.