Zkteco RFID ID读取器通过php Zklibrary



我目前正在使用与LAN上连接的出勤设备进行公园自动化项目,并且我拥有Zkteco Company的Model K40。不幸的是,该设备未使用Web服务器实现,因此交互的唯一方法是使用TCP端口4370。

该项目是自定义的,用PHP编写,我使用了GitHub(https://github.com/carlosang2/zklibrary)的CarloSang2库与设备进行交互。到目前为止,除了Setuser功能之外,一切都很好。我可以将新用户设置为具有ID,名称,密码,角色到设备的角色,但我无法设置卡的RFID

添加一条额外的行以与您的cardno一起使用,

$cardno = hex2bin(Util::reverseHex(dechex("1254107"))); //add this line
$command_string = $byte1.$byte2.chr($role).str_pad($password, 8, chr(0)).str_pad($name, 24, chr(0)).str_pad($cardno, 4, chr(0)).str_pad(chr(1), 9, chr(0)).str_pad($userid, 8, chr(0)).str_repeat(chr(0),16);

n.b。我正在使用此https://github.com/vodvud/php_zklib库。但是我必须在set()函数中添加其他行。它位于zklib-> scr-> user.php

最新更新