简体   繁体   中英

Figure out with which device was a picture taken from - Is it possible?

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.

You 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

http://nl3.php.net/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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM