11

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.

I googled and found a script which uses PHP SOCKETS to retrieve data through device IP (Link):

$ 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):

$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.

Fingerprint type: Granding

Available SDKs: C# and ASP.NET

Nimantha
  • 4,731
  • 5
  • 15
  • 38
CairoCoder
  • 2,611
  • 7
  • 39
  • 60
  • 1
    Well what type of api or interface *is* provided with the device? This question is probably too specific for SO – Steve Jan 20 '15 at 11:21
  • @Steve, they provided a C# and ASP.NET SDKs. – CairoCoder Jan 20 '15 at 11:22
  • @CairoCoder it's true that the question is too specific, but if you have a C#/ASP.NET SDK and you're running on a windows machine you can give a try to the dotnet class - http://php.net/manual/en/class.dotnet.php – Diogo Raminhos Jan 20 '15 at 11:32
  • 2
    Do you have a link to the c# api documentation? I expect the simplest thing to do would be to write a small c# app that dumps the data into database or flatfile for simple retrieval via php. – Steve Jan 20 '15 at 11:39
  • Yes @Steve, I have a link: http://www.granding.com/CMS/Uploads/SDK_6.2.4.1_with_DEMO.rar – CairoCoder Jan 20 '15 at 11:52
  • @Whiteagle Will give it a try, but I don't have past experience with C# or ASP.NET – CairoCoder Jan 20 '15 at 11:53
  • It is indeed possible.Check out this solution PHP Web Biometric Authentication PACK found here https://jomutech.com/phpwebbiometricauthenticationlitepack/ You could also check out other examples of PHP Web Biometric Authentication and Integration at https://jomutech.com . Disclaimer:Some of the pictures for the said PHP Biometric Web Applications found in those links are mine. – Joseph Aug 12 '19 at 09:37

2 Answers2

3

Handling the biometric machine through PHP is possible. There is an answer for a similar question in 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.

Martin Evans
  • 37,882
  • 15
  • 62
  • 83
Kevin
  • 39
  • 3
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Martin Evans Aug 30 '17 at 17:41
  • @kevin, your link points to the api documentation which helps to recording the attendance. There is another api link: https://www.quora.com/Can-we-integrate-bio-metric-attendance-system-with-php/answer/Otchathevan which talks about capturing a fingerprint from the client page. – Ravanan Nov 11 '18 at 15:35
  • The link from above comment is not accessible. https://youtu.be/w5QEQglRmK8 Check this video link which demonstrates integrating biometrics with PHP program – Ravanan Oct 01 '20 at 19:55
2

along with the granding fingerprint devices (zk7000) I faced similar difficulties, php scripts was not working for me. you can try bio-plugin that supports php integration and worked well in my system.