How to connect the device to Zklibrary PHP, Its only connected by usb and the code requires Device IP

106 Views Asked by At

I need to connect the usb fingerprint device to Zklibrary PHP, Its only connected by usb and the code requires Device IP and i don't really know what to do.

Below is the code for initializing the connection to the device. My device is a zkteco live20r fingerprint scanner (USB)

<?php
//The socket functions described here are part of an extension to PHP which must be enabled at compile time by giving the --enable-sockets option to configure.
//Add extension=php_sockets.dll in php.ini and extension=sockets
//user defined rule 4
//super admin rule 14
//normal user 0
// include "zklibrary.php";
include_once(APPPATH . 'libraries/zklibrary.php');
require_once(APPPATH . 'libraries/zklibrary.php');
echo 'Library Loaded</br>';
$zk = new ZKLibrary('127.0.0.1', 4370, 'TCP');
echo 'Requesting for connection</br>';
$zk->connect();
echo 'Connected</br>';
$zk->disableDevice();
echo 'disabling device</br>';
$users = $zk->getUser();
0

There are 0 best solutions below