Get data from Fingerprint device using PHP

CairoCoder picture CairoCoder · Jan 20, 2015 · Viewed 64.9k times · Source

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

Answer

Kevin picture Kevin · Aug 30, 2017

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.