coding-libs / zkteco-php
A package for managing ZKTeco device.
Requires
- php: ^8.0
- illuminate/support: ^9.0|^10.0|^11.0
Requires (Dev)
- phpunit/phpunit: ^8.0|^9.3|^10.4
This package is auto-updated.
Last update: 2025-03-29 01:09:05 UTC
README
Warning
⚠️ This repository is not recommended for use in production. ⚠️
This repository is currently in development and may contain bugs or incomplete features. Use at your own risk and do not deploy to a production environment.
About zkteco-php
The zkteco-php library provides a robust solution for php/laravel developers to interface with ZK BioMetric Fingerprint Attendance Devices. Its user-friendly API allows seamless extraction of data, such as registered users, logs, and device versions. Developers can also add users, retrieve real-time logs, and clear attendance records. Using a socket connection, the library ensures fast and reliable data exchange. Whether creating an attendance system or a time-and-attendance management application, zkteco-js is the essential tool for integrating biometric devices efficiently.
Installation
composer require coding-libs/zkteco-php
Usage Example
// Uncomment the line below if you are not using a PHP framework and need to manually load Composer dependencies. // require_once "vendor/autoload.php"; use CodingLibs\ZktecoPhp\Libs\ZKTeco; $zktecoLib = new Zkteco('192.168.1.1'); $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->deleteUsers(function($user){ // condition goes there }); // delete users conditionally
Contributing
Please see CONTRIBUTING for details.
Security
If you've found a bug regarding security please mail codinglibs4u@gmail.com instead of using the issue tracker.
Alternatives
License
The MIT License (MIT). Please see License File for more information.