Thread: filemtime()
View Single Post
Old 06-09-2008, 02:09 PM   #1 (permalink)
buggabill
The Contributor
 
buggabill's Avatar
 
Join Date: Jan 2008
Location: Maine, USA
Posts: 92
Thanks: 2
buggabill is on a distinguished road
Default filemtime()

Hi all,

I am trying to get the filemtime() of a file while connected via ftp. This is not directly possible, but I was wondering if anyone had an idea on how to get this information.

The files are uploaded to our web host via an ftp script. I am taking key parts of the file name and displaying the information.

The only thing missing from the file name is the date it was generated.

The only solution I came up with was to write a script to run on the web host to update a MySQL table with the information. This is not really the most desirable method to me as it will require setting up a cron job to run on some interval thereby introducing the possibility of someone not seeing the correct data. I could also run a wget script at the end of the upload, but this will require a bunch of coding on the systems side of things.

I guess my question is this: Is there a way to get the file information remotely without transferring the actual file i.e. transfer the file header information or whatever?
__________________
-- Bill
"Why is it drug addicts and computer aficionados are both called users?" -Clifford Stoll
buggabill is offline  
Reply With Quote