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

This might seem a bit odd to ask, but I couldn't get an answer through Google - maybe because I wa

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
Add a ment  | 

3 Answers 3

Reset to default 6

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

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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信