Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LastModified date of another file

Status
Not open for further replies.

chancer101

Programmer
Mar 19, 2002
7
0
0
GB
Hi,

I've have a number of html files which are regularly updated
by my users. I know the filenames and the locations.

What I'd like to do is to display the last modified date of
each of these files on the home page of my website e.g.

Cricket.html 22/06/02 10:56
Football.html 24/06/02 09:34
Hockey.html 23/06/02 17:21

I know you can use document.lastmodified, if you're within
the file, but what about referencing another (external) file ?.

Any help would be VERY appreciated,

Paul
paul101paul@hotmail.com






 
The Hard Way
Put the last modified info in divs with unique IDs for each page you want to list on your homepage. Then load these pages in hidden frames on your homepage. Now, you'll have access to the last modified information for all those pages ... and your homepage could take forever to load.

The Less Hard Way
Store the information in a database and access it via your homepage with the scripting flavor you like the best ... php, asp, aspx, etc ... and unless you have a program to watch for those file changes and automatically update the database, you could be updating the database yourself, just like you're hard coding the information now.

I don't know of an easy way to do what your asking, but if you have access to a database, I would suggest The Less Hard Way, even without the file watcher program. With the file watcher program, it could be just what your looking for, unless the pages in question are really small and the effect on the loading of your homepage is very slight. Then The Hard Way might be your ticket.

In any event, good luck! Let me know how it works out via this thread.
Paul Ellis
[hammer] I've been programming since you had to punch holes in cards to code. (Always remember, number your cards!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top