[英]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)? 这个问题似乎有点奇怪,但是我无法通过Google得到答案-也许是因为我没有使用正确的关键字,但是有一种方法可以找出答案(通过javascript,jQuery,PHP或其他任何方法)方式)是从什么设备上拍摄照片的 (例如:通过网络摄像头,电话或照相机等)?
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_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.
您想读取EXIF数据。 For PHP, use exif_read_data .
对于PHP,请使用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 以上是来自Alexn的以下stackoverflow帖子
http://nl3.php.net/manual/en/function.exif-read-data.php http://nl3.php.net/manual/en/function.exif-read-data.php
But that will only work for JPEG or TIFF according to the documentation. 但是,根据文档,这仅适用于JPEG或TIFF。
PS: Javascript or JQuery? PS:Javascript还是JQuery? JQuery is Javascript (sort of).
jQuery 是 Javascript(某种)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.