使用 PHP 从指纹设备获取数据
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28044042/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Get data from Fingerprint device using PHP
提问by CairoCoder
I am working on attendance application using PHP and MySQL, I want to automate the attendance process by getting all data from fingerprint devices directly and import them into MySQL database through PHP script.
我正在使用 PHP 和 MySQL 开发考勤应用程序,我想通过直接从指纹设备获取所有数据并通过 PHP 脚本将它们导入 MySQL 数据库来自动化考勤过程。
I googled and found a script which uses PHP SOCKETS to retrieve data through device IP (Link):
我在谷歌上搜索并找到了一个脚本,它使用 PHP SOCKETS 通过设备 IP(链接)检索数据:
$ cd your_repo_root/repo_name
$ git fetch origin
$ git checkout gh-pages
The problem is the data looks messy, not complete and there's a lot of decryption through library functions.
问题是数据看起来很乱,不完整,而且通过库函数有很多解密。
I also tried the CURL, but it's not working (Link):
我也尝试过 CURL,但它不起作用(链接):
$number="";
for($i=1;$i<=100;$i++){
$number.=($i.",");
}
$number=substr($number,0,strlen($number)-1);
$url = "http://192.168.2.201/form/Download?uid=".$number."&sdate=2013-09-10&edate=2013-09-10";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
curl_close ($ch);
$data = array();
$record = explode("\n",$server_output);
foreach($record as $r){
$r = str_replace("\t"," ",$r);
$isi = explode(" ",$r);
array_push($data, $isi);
}
print_r($data);
Is there's any other ways that I can get all the data from fingerprint through PHP, as the provider of the device doesn't provide any PHP SDK for it.
有没有其他方法可以通过PHP从指纹中获取所有数据,因为设备的提供者没有为其提供任何PHP SDK。
Fingerprint type: Granding
指纹类型:Granding
Available SDKs: C# and ASP.NET
可用的 SDK:C# 和 ASP.NET
回答by Kevin
Handling the biometric machine through PHP is possible. There is an answer for a similar question in Quora:
通过 PHP 处理生物识别机器是可能的。Quora上有一个类似问题的答案:
Can we integrate bio-metric attendance system with php?
According to this, you can configure an internet URL where you can handle the attendance data.
据此,您可以配置一个互联网 URL,您可以在其中处理考勤数据。
回答by Arifin Hussain
along with the granding fingerprint devices (zk7000) I faced similar difficulties, php scripts was not working for me. you can try bio-pluginthat supports php integration and worked well in my system.
随着宏大的指纹设备(zk7000)我面临类似的困难,php脚本对我不起作用。您可以尝试支持 php 集成并在我的系统中运行良好的bio-plugin。