saint959 Posted April 16, 2007 Share Posted April 16, 2007 Hi All, I am new to this forum and am hoping that someone will be able to help me. I am writing an application that allows users to upload images to our server. which i have done fine, I then need to check the date that the image was created to confirm that it was taken as recently as possible. i.e. minutes before uploading the image. The problem i am having is: when the file has been uploaded all the properties of the image are re-created because they get changed by the server during the upload process.(all the dates are the same as the submission of the form). Is it possible to get the properties of the image before the server changes the creation date? I hope this makes sense, and any help will be hugely appreciated! Quote Link to comment Share on other sites More sharing options...
mjlogan Posted April 16, 2007 Share Posted April 16, 2007 You may find that all those details are lost as the file will be recreated on the server after uploading, so the date created and modified will always show the time the file was uploaded. And I personally don't know of a way of reading meta data from a file on a remote computer, as the server will always make a copy of the file to the local machine. But somebody else might.... Quote Link to comment Share on other sites More sharing options...
saint959 Posted April 16, 2007 Author Share Posted April 16, 2007 hi mjlogan, thanks for the reply. Thats exactly what i thought the problem was going to be. i am going to do more research on the meta data you mentioned. hopefully something will come from that. pls if anyone else has ideas please let me know. thanks again Quote Link to comment Share on other sites More sharing options...
saint959 Posted April 16, 2007 Author Share Posted April 16, 2007 Hi, i have managed to find this functions thanks to mjlogan's idea: exif_read_data(): Does anyway one maybe have an idea how i can get out just a specific section of the function (or just one variable). I checked the PHP manual at (http://www.php.net/manual/en/function.exif-read-data.php) but i do not really understand what they say there. i have tried different combinations for the function without much success. Here is a the section of code that displays all the photos meta information. $exif = exif_read_data("photoname.jpg", 0, true); foreach ($exif as $key => $section) { foreach ($section as $name => $val) { echo "$key.$name: $val<br/>"; } } This then prints ALL the photos information whereas i only need one line of the above output. If you would like to see the out put from the above code then let me know and ill paste it here ASAP. Thanks again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.