The code I tried:
$address = '192.168.0.201';
$port = 4073;
$timeout = 30;
if (($socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false) {
exit("socket_create() failed: reason: " . socket_strerror(socket_last_error()));
}
$result = socket_connect($socket, $address, $port);
The socket is created successfully but socket_connect results with:
Warning: socket_connect(): unable to connect [10061]: No connection could be made because the target machine actively refused it in...
Device is on the same network and subnet, device and card reading works fine with the ZKAccess software..
I also tried existing library - https://github.com/mlrahman/ZKTeco_Attendance_Access_Using_PHP , but it produces identical error. Am I missing some steps or device configuration here?