upload finger print from scanner to device zkteco

660 views Asked by At

I want to upload fingerprint from zk9500 to actual device, i'm using this library https://github.com/vodvud/php_zklib/ the author is stuck at in line 72 so am i.. solution in php, nodejs or c# would be accepted thanks.. here is my code:

 $byte1 = chr((int)(620 % 256));
    $byte2 = chr((int)(620 >> 8));
    $fingerTemplate = "TVZTUzIxAAAEFRsECAUHCc7QAAAoFHYBAAAAgzgmrBXnAHAPxAADAAUagADMAHAPfgAUFHAPdAC3ALYP9xXFAAkPXAAnAOga/AAEAX4OlQC9FfULYgCGALIP8RV/AIkJ0wCdAVMbkQBSAIIOXgD3FfQNwADAALoP0xXOAH8PhgDBAeMZ4AAIAf4OPQDlFQcP2QAhATsO8BUQAXwO4AD8AWEaYwA+AVIJ/ACoFe8INwCPALYKBBRSAWUOpQA4AG8YkwD9AGgMsgDqFWIMdQDDADwP4BW4AIAPzADhAW4bfgCZAHoPGQAwFGgPRwC4AK4LhxVqAAAPugCkAIMaDgFCAYMLtH1RE3MIKIaRhbeBqW24/l4NNQtoCyJgSX85Bt741Im1EuuMpohy9o/7WRF8g755EIrkC46UI/3ue4IHgguPEjqD+vX28eP3VZIP/18P6I9ojGmQKYIZA/oBUIHdFpgDhYBBh7j3kZDQA32DNf9ziRaf+Ze9lbmaGACdlHOAwP7Ranj/A3oK7/vzsYVs/1VqTIcG/z4LPOa+F5sTtXiVBRj+/GKEgBn9RX93eDbpRYuhiBIG3HlRFnOBDG85Anz7Uh2fBVKDPAYUbb0XGXqxfcb7kIPinsaIigdzisoDWTeGIIsd8j1FRq41PQECKh4qwACZLQ6FCgBpOzL9K9fBRg0AVEQ//cfo/lpVwAYAj0/+RPwJAJdSCQVRXBABeFiGiwvFuGWTwcL/wzpUzACDewJW/1URAPd18FPBwMIrV/+WEgQ6gPRU/z3CgEzF6wQAYId0etQAKZ72V8D/U8CdwEIHAAOWicB0O8T51//CwcJnwcMAeY97wMJzEQHNnYdEa2VxwYQSxA2ik8FZYmfAZr4PBRquiWpZYsCvDwT2toNWe8JwBIULFBC4icDBwLZxUNYGAHO5cP9JwwcV6roGwQkAJryE1FFrBABMvq6YCBW8wX3AaMNOkAcV98MD/wQADcT5UQIA9scJwM0AxN18a3cHAMgMAEfqwAQAgMxxBMIKFdTPgGpvZgeIFxQS2obAaVk6g/qIegoBEOuGBXHElBUBFuGGwL5qddfAwcHBwP8HBARM5GKMCwCnLXfH6pLAaAYAeCpph9QLARzyg1gEe8QfAZb2bcNnBcCFHAAc+oZWhzoLBLb6cIPBXZHOEKEUbHd3XREQPwKHksGBw8JxwJMUFQsCicFuwMI7kMWBf8EKELkQtXXHd8MMEPUSgLvCxmR2EBEcFYkFeIhkwIcOER4eTMCISZGJBhDaIj84+xIRyyZthMMFDBUOLYlwjMLCBcMBBdkzbcKQC9QeMJzAcsLCw4XAENoibMKVBRDm8v08ERHfPGaRB9QNO5yUw/8DEGKFU8QTEA1Eg4/DwxEbRI2CxQ==";
    
    $finger = array(implode('', [
        strlen($fingerTemplate), //size
        620, //uid
        "6", //fingerId
        "1", //finger validity
        $fingerTemplate
    ]));
        echo( strlen($fingerTemplate));
    $zk->setFingerprint(620,$finger);

$fingertemplate was acquired from zk9500, uid 620 is my testing user..

1

There are 1 answers

0
nab On BEST ANSWER

In my case the only solution that worked for me is to use the zklib dll, create a rest api using c# to connect the fingerprint scanner with web application.