Page 1 of 1

PHP file upload (not common problem!)

Posted: Sun Jun 01, 2008 4:47 pm
by torli
Hi! (my first post here, so please be gentle)
I want to upload a file through html form and I want to know it's creation date/time.
I use this code:

Code: Select all

date ("F d Y H:i:s.", getlastmod($_FILES['uploadedfile']['tmp_name']));
but as you know it displays the creation date of uploaded file, not original one. I wonder is there any way to send to the server through html form the file and it's creation date/time. The file is a HTML-format file (so basically a txt one) and I cannot read it for example from EXIF (jpeg).

Any suggestions would be great!
Thx in advance for any help!

Re: PHP file upload (not common problem!)

Posted: Sun Jun 01, 2008 5:44 pm
by Benjamin
This will not be possible as the browser doesn't send this information.

Re: PHP file upload (not common problem!)

Posted: Sun Jun 01, 2008 7:13 pm
by Weirdan
It might be possible if you're using something other than just browser for file uploads, something that may ask user for access to file system, like signed java applet.