PHP code example of coding-libs / zkteco-php
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.
// rName(); // "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->deleteUsers(function($user){
// condition goes there
}); // delete users conditionally