|
-
Sep 15th, 2000, 09:05 AM
#1
Is there a way to check the date of a file on the net (changed, created and/or accessed)?
-
Sep 15th, 2000, 09:55 AM
#2
It's pretty easy if you use the Microsoft Internet Transfer Control.
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")
Good luck!
-
Sep 15th, 2000, 10:06 AM
#3
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?
-
Sep 15th, 2000, 10:17 AM
#4
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.
-
Sep 15th, 2000, 10:24 AM
#5
So if I want to check if a page was updated, I should use the "Last-modified"? (Sorry for bugging you Joacim)
-
Sep 15th, 2000, 10:29 AM
#6
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|