Open johnebarita opened 4 years ago
Hello!
I just want to know what models of ZKTeco devices does the library support?
Sorry, I have not list of models but I think many models support. To check it you may use this library on your model.
And can the library be used to get the attendance data from the zkteco device at a regular interval to provide a bit of a real-time data on my web app.
Yes, sure. Best solution for attendance records: receive the attendance log hourly or more often (by Cron job), save to your own DB and remove from device. Then you may working with DB data up to you want.
Example method for get data and clear device:
/**
* Get log from device
*
* @param string $ip
* @return array
*/
public function get($ip)
{
$log = [];
if (!empty($ip)) {
$zk = new ZKLib($ip);
if ($zk->connect()) {
$zk->disableDevice();
$log = $zk->getAttendance();
if (count($log) > 0) {
$zk->clearAttendance();
}
$zk->enableDevice();
$zk->disconnect();
}
}
return $log;
}
Thanks for the response. And for those who might stumble upon this comment.
I used ZKTEco 628.
Hi.
Thanks for the library. I just want to know what models of ZKTeco devices does the library support?
And can the library be used to get the attendance data from the zkteco device at a regular interval to provide a bit of a real-time data on my web app.