1. Go to this page and download the library: Download coding-libs/zkteco-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
coding-libs / zkteco-php example snippets
// Uncomment the line below if you are not using a PHP framework and need to manually load Composer dependencies.
// 1.1', port:4370, shouldPing:false, timeout:25, password:12345); // Password means CMD Key
$zkteco->connect();
$zktecoLib->vendorName(); // "ZKTeco Inc.
$zktecoLib->deviceName(); // "F22/ID
$zktecoLib->serialNumber(); // "BOCK201261276
$zktecoLib->pinWidth(); // "14
$zktecoLib->faceFunctionOn(); // "0
$zktecoLib->platform(); // "ZLM60_TFT
$zktecoLib->fmVersion(); // "10
$zktecoLib->ssr(); // "1
$zktecoLib->version(); // "Ver 6.60 Sep 19 2019
$zktecoLib->workCode(); // "0
$zktecoLib->getFingerprint(1);
$zktecoLib->getUsers(); // users
$zktecoLib->getAttendances(); // attendances logs
$zktecoLib->getTime(); // device time
$zktecoLib->clearAdminPriv(); // Removes the admin privileges from the current user.
$zktecoLib->clearAllUsers(); // clear all users
$zktecoLib->getAttendances(function ($item){
// condition goes there
return $item;
}); // attendances logs
$zktecoLib->deleteUsers(function($user){
// condition goes there
}); // delete users conditionally
$zktecoLib->deviceId(); // "0
$zktecoLib->getDeviceData('TCPPort'); // "4370
$zktecoLib->setCustomData('my_company_name', "Coding Labs"); // You can set any custom value as you want
$zktecoLib->getCustomData("my_company_name"); // "Coding Labs
$zktecoLib->setPushCommKey("iclock_push_commKey"); // It may be useful for iClock authentication.
$zktecoLib->getPushCommKey(); // "iclock_push_commKey
# and more...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.