Preserved Topic: Last modified |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: Canada, Toronto |
posted 11-11-2001 02:15 |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 11-11-2001 11:13
You didn't specify which protocol you plan on using (HTTP, FTP, etc.), so I'll assume that you want to use HTTP protocol. If so, HTTP header that web server sends back when you request some specific document (html page, image file, etc.) contains "Last-Modified" string which is the thing that you want. And now to explain how to fetch HTTP header (I don't know how ASP works, so I'll talk generally). You must establish raw TCP/IP socket connection (you should also insure that you're connecting to the right port - 80 is mostly used for HTTP) with server that's hosting the file whose last modified timestamp you want to get. After that you must send "HEAD" HTTP request (you can also use "GET", but we only need header, not actual document) to the server and fetch the result that it sends back. After that simply parse the result (look for "Last-Modified" string). Here's how you can get HTTP header with PHP: |
Paranoid (IV) Inmate From: Canada, Toronto |
posted 11-11-2001 23:35
Thanks Max, |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 11-12-2001 11:31
The poster has demanded we remove all his contributions, less he takes legal action. |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 11-12-2001 11:34
The poster has demanded we remove all his contributions, less he takes legal action. |
Paranoid (IV) Inmate From: Canada, Toronto |
posted 11-12-2001 17:52
Thanks InI, I know about FSO, that's how I found out the last modified date of the file that is on the server (where my site is hosted), but I need to know the last modified date for the file that is on an another server, let's say http://www.ozoneasylum.com/images/ASYLUM44b.jpg |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 11-12-2001 18:17
The poster has demanded we remove all his contributions, less he takes legal action. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 11-12-2001 21:37 |
Paranoid (IV) Inmate From: Canada, Toronto |
posted 11-15-2001 22:15
Max, I hear you but here is the solution: |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 11-15-2001 23:39
The poster has demanded we remove all his contributions, less he takes legal action. |
Paranoid (IV) Inmate From: Canada, Toronto |
posted 11-15-2001 23:42 |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 11-16-2001 00:05
The poster has demanded we remove all his contributions, less he takes legal action. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 11-16-2001 08:26 |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 09-22-2002 04:13
Does the header that's returned always have a Last-Modified string in it? |
Paranoid (IV) Inmate From: Lebanon |
posted 09-23-2002 09:14
Hello Sash, |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 09-25-2002 02:10
I've been looking at the headers returned by butcher's implementation of that code and the results seem highly variable so I'm wondering what are the conditions/server settings which determine what is sent back and why? |