think-digitally Posted May 18, 2008 Share Posted May 18, 2008 Hi, I am a bit of a newbie. I am making a photography website for myself. I am making a uploader in the back end that enables me to upload a photo, when the photo is uploaded, I want a piece of code that strips the EXIF data from the photo and puts it in a database... This is where I am stuck I would be overly greatful if anyone could help me get started To anyone that replies... Thankyou Chris Link to comment https://forums.phpfreaks.com/topic/106137-help-please/ Share on other sites More sharing options...
xnowandtheworldx Posted May 18, 2008 Share Posted May 18, 2008 When you submit the form call the exif_read_data(); function Info here: http://us2.php.net/manual/en/function.exif-read-data.php If you don't know how to create an upload form already, let us know we would be glad to help. Here's an example usage of the exif function. <?php $image = image here; $exif = exif_read_data('$image', 'IFD0'); echo $exif===false ? "No header data found.<br />\r\n" : "Image contains headers<br />\r\n"; $exif = exif_read_data('$image', 0, true); echo "File Name: " . $exif['FILE']['FileName'] . "\r\n"; echo "File Size: " . $exif['FILE']['FileSize'] . "\r\n"; echo "File Date Time: " . $exif['FILE']['FileDateTime'] . "\r\n"; echo "Width: " . $exif['COMPUTED']['Width'] . "\r\n"; echo "Height: " . $exif['COMPUTED']['Height'] . "\r\n"; ?> In theory this SHOULD work..just edit to your liking...as for the database part... Have a look at this link... http://www.110mb.com/forum/beginnertutorial-on-the-mysql-basics-t17770.0.html If you need any more help just let us know! Edit: Also note, this function is only in PHP 4.2.0 or higher. Link to comment https://forums.phpfreaks.com/topic/106137-help-please/#findComment-544010 Share on other sites More sharing options...
think-digitally Posted May 18, 2008 Author Share Posted May 18, 2008 Wow, thankyou so much. I have read through the links given, and they have really helped... I am a little unsure how to create an uploader that will work with this, so any help would be massivly appreciated Again thankyou soooo much! Link to comment https://forums.phpfreaks.com/topic/106137-help-please/#findComment-544321 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.