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?
Would ftp_mdtm not suffice?
It will. Thank you Wildhoney. I rewrote the function to use ftp and it works as intended.
Do you think that it would it be possible to do this without using ftp?
Thanks again for the help!
|All times are GMT. The time now is 02:53 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0