Download the PHP package jmrashed/zkteco without Composer
On this page you can find all versions of the php package jmrashed/zkteco. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jmrashed/zkteco
More information about jmrashed/zkteco
Files in jmrashed/zkteco
Package zkteco
Short Description ZKTeco Package For Laravel. This package provides seamless integration with ZKTeco devices within Laravel applications, enabling communication with attendance devices such as fingerprint, face recognition, or RFID using UDP protocol.
License MIT
Informations about the package zkteco
This Laravel package provides convenient functions for interacting with ZKTeco devices, allowing seamless communication with attendance devices (such as fingerprint, face recognition, or RFID) using UDP protocol. It simplifies the process of reading and writing data directly to these devices from a web server without the need for additional programs.
With this package, you can easily perform various activities with ZKTeco devices, such as retrieving attendance logs, setting user data, enabling or disabling device functions, and more, all within your Laravel application.
Designed as a class-based library, you can simply create an object of the provided class and utilize its functions to interact with ZKTeco devices effortlessly.
Key features include:
- Reading and writing data to attendance devices using UDP protocol.
- Seamless communication between web servers and attendance devices.
- Simplified implementation for activities such as retrieving attendance logs, setting user data, and managing device functions.
- Integration with Laravel framework for easy usage and compatibility.
Experience streamlined communication and management of ZKTeco devices directly from your Laravel application with this ZKTeco Laravel package.
The jmrashed/zkteco
package provides easy to use functions to ZKTeco Device activities.
Prerequisites
- PHP installed on your system
- Access to the
Jmrashed\Zkteco\Lib\ZKTeco
class - Knowledge of the ZKTeco device IP address and port (if different from the default)
Installation
To use the ZKTeco library, you need to include it in your PHP project. You can install it via Composer:
Enabling PHP Sockets
This guide outlines the steps to enable PHP sockets on your server. Sockets are essential for establishing communication channels between different processes or computers over a network.
Prerequisites
- PHP installed on your server
- Access to the
php.ini
configuration file - Basic knowledge of server administration
Steps
-
Check PHP Installation: Verify that PHP is installed on your server by running
php -v
in your terminal or command prompt. - Enable Sockets Extension: Edit the
php.ini
file to enable the sockets extension. Find the following line:
Remove the semicolon at the beginning of the line to uncomment it:
-
Restart Web Server: After editing
php.ini
, restart your web server to apply the changes. Use the appropriate command based on your server software (e.g., Apache, Nginx). -
Verify Installation: Create a PHP file (e.g.,
test.php
) with the following contents:Access this file through your web browser to verify that the sockets extension is enabled.
-
Firewall Configuration (if necessary): If you're using a firewall, ensure it allows connections on the socket port (default: 80).
- Test Socket Communication: Implement socket communication logic in your PHP scripts to test the functionality. See the provided PHP example for creating a socket connection.
Example Usage
Include the steps outlined in this guide in your server setup documentation to ensure proper configuration and enable PHP sockets for your applications.
Usage of ZKTeco
- The provided PHP code snippet seems to demonstrate the usage of the ZKTeco library, specifically for interacting with ZKTeco devices, likely for biometric attendance or access control systems. Let's elaborate on the code:
- Importing the ZKTeco Library:
This line imports the ZKTeco class from the Jmrashed\Zkteco\Lib namespace. This class likely contains the functionality to communicate with ZKTeco devices.
- Instantiating the ZKTeco Object::
Here, an instance of the ZKTeco
class is created with the IP address 192.168.1.201
. This likely establishes a connection to the ZKTeco
device at that IP address. Optionally, you can specify the port number as the second parameter if it's different from the default port 4370
.
- Alternative Instantiation with Port::
This is an alternative way to instantiate the ZKTeco
object, where both the IP address (192.168.1.201
) and port number (8080
) are provided explicitly.
Calling ZKTeco Methods
1. Connect to Device
2. Disconnect from Device
3. Enable Device
Note: It's important to call the enableDevice() method after any read or write operation on the device.
4. Disable Device
5. Device Version
6. Device OS Version
7. Power Off
8. Restart
9. Sleep
10. Resume
11. Voice Test
12. Platform
13. Firmware Version
14. Work Code
15. Device Name
16. Get Device Time
17. Set Device Time
18. Get Users
19. Set Users
20. Clear All Admin
21. Clear All Users
22. Remove A User
23. Get Attendance Log
24. Get Todays Attendance Log
24.1 getTodaysRecords()
Sample Response Example
24.2 Get today's Records
24.3 Get Latest Attendance with Limit
24.4 Clear Attendance Log
Change log
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email [email protected]
instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
Conclusion
This guide covers various methods provided by the ZKTeco library in PHP for interacting with ZKTeco devices. You can use these methods to perform various operations such as device management, user management, attendance tracking, and more.