This might seem a bit odd to ask, but I couldn't get an answer through Google - maybe because I wasn't using the correct keywords, but is there a way to find out (either through javascript, jQuery, PHP or any other way) from what device a picture was taken (For example: via webcam or phone or camera etc)?
I'm not sure if this is the right place to ask this question, but please excuse if I'm at the wrong place.
Thanks in advance.
This might seem a bit odd to ask, but I couldn't get an answer through Google - maybe because I wasn't using the correct keywords, but is there a way to find out (either through javascript, jQuery, PHP or any other way) from what device a picture was taken (For example: via webcam or phone or camera etc)?
I'm not sure if this is the right place to ask this question, but please excuse if I'm at the wrong place.
Thanks in advance.
Share Improve this question asked Oct 3, 2012 at 9:55 asprinasprin 9,84312 gold badges70 silver badges125 bronze badges 2- What information are you starting with? Just the photo file? – ColBeseder Commented Oct 3, 2012 at 9:57
- I'm using flash to capture a screenshot. – asprin Commented Oct 3, 2012 at 9:58
3 Answers
Reset to default 6You can use exif_read_data
$exif = exif_read_data('a.jpg');
var_dump($exif);
Please note that the Device information is not always available
You want to read the EXIF data. For PHP, use exif_read_data. Sample:
<?php $exif = exif_read_data('a.jpg'); $model = $exif['Model']; $iso = $exif['ISOSpeedRatings']; $taken = $exif['DateTime']; ?>
The above is from the following stackoverflow post by Alexn
https://www.php/manual/en/function.exif-read-data.php
But that will only work for JPEG or TIFF according to the documentation.
PS: Javascript or JQuery? JQuery is Javascript (sort of).
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744308591a4567838.html
评论列表(0条)