Getting file timestamp from url

Tim Roberts timr at probo.com
Sun Nov 18 02:37:40 CET 2007


"mhearne808[insert-at-sign-here]gmail[insert-dot-here]com"
<mhearne808 at gmail.com> wrote:
>
>Is is possible to get the timestamp of a file on a web server if it
>has a URL?

No, not in the general case.

>For example, let's say that I want to know when the following file was
>created:
>
>http://www.w3schools.com/xml/note.xml

Remember that the only information that you get back from the server is the
HTTP request.  There is a "Last-Modified" header in the HTTP standards that
says when the page was last modified, and Apache is good about sending it,
but that's all you can find out.  Plus, remember that web proxies can
interfere with this.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list