PHPackages                             jmrashed/zkteco - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. jmrashed/zkteco

ActiveLibrary[API Development](/categories/api)

jmrashed/zkteco
===============

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.

1.2.0(7mo ago)517.1k↑19.2%19[12 issues](https://github.com/jmrashed/zkteco/issues)MITPHPPHP ^8.0

Since May 23Pushed 6mo ago3 watchersCompare

[ Source](https://github.com/jmrashed/zkteco)[ Packagist](https://packagist.org/packages/jmrashed/zkteco)[ RSS](/packages/jmrashed-zkteco/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

[![](./src/Assets/header.png)](./src/Assets/header.png)

[![Packagist Downloads](https://camo.githubusercontent.com/410314a10ca9d0f562915aa2e6dcd9d8cb32792a323a8f49f8299f4b4c3aba28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6d7261736865642f7a6b7465636f)](https://camo.githubusercontent.com/410314a10ca9d0f562915aa2e6dcd9d8cb32792a323a8f49f8299f4b4c3aba28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6d7261736865642f7a6b7465636f)[![GitHub stars](https://camo.githubusercontent.com/1a78227d21b63a9b757f90abb2b1c4435321d541c8eed1f1122d9761e5de04b4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6a6d7261736865642f7a6b7465636f)](https://camo.githubusercontent.com/1a78227d21b63a9b757f90abb2b1c4435321d541c8eed1f1122d9761e5de04b4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6a6d7261736865642f7a6b7465636f)[![GitHub forks](https://camo.githubusercontent.com/20ccf7d94001c4f3bb3bef5861fc10027652fa14051bfc21fd7e9b91bc50149a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6a6d7261736865642f7a6b7465636f)](https://camo.githubusercontent.com/20ccf7d94001c4f3bb3bef5861fc10027652fa14051bfc21fd7e9b91bc50149a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6a6d7261736865642f7a6b7465636f)[![License](https://camo.githubusercontent.com/f399bdd6f5352de1726fbe95cdf9aa0ea983fd15ecefc6778d657feb3affd06d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6d7261736865642f7a6b7465636f)](https://camo.githubusercontent.com/f399bdd6f5352de1726fbe95cdf9aa0ea983fd15ecefc6778d657feb3affd06d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6d7261736865642f7a6b7465636f)[![Latest Stable Version](https://camo.githubusercontent.com/95b94868327bf20c0b13fe72b7eec693a000974ea162e6bd6c5bee3a2ad1ff07/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6d7261736865642f7a6b7465636f)](https://camo.githubusercontent.com/95b94868327bf20c0b13fe72b7eec693a000974ea162e6bd6c5bee3a2ad1ff07/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6d7261736865642f7a6b7465636f)[![GitHub issues](https://camo.githubusercontent.com/6073c9e8dd509b8126be01b45c696ed035abc4b5891f6f6460a143e2c378fe23/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6a6d7261736865642f7a6b7465636f)](https://camo.githubusercontent.com/6073c9e8dd509b8126be01b45c696ed035abc4b5891f6f6460a143e2c378fe23/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6a6d7261736865642f7a6b7465636f)[![GitHub closed issues](https://camo.githubusercontent.com/3781986a9a73437cc4f94ce015157c45e50cb61e4d53c0937cba284798355b4d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d636c6f7365642f6a6d7261736865642f7a6b7465636f)](https://camo.githubusercontent.com/3781986a9a73437cc4f94ce015157c45e50cb61e4d53c0937cba284798355b4d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d636c6f7365642f6a6d7261736865642f7a6b7465636f)[![GitHub pull requests](https://camo.githubusercontent.com/56cbeab81b8ed82186c1d016b3c68926eb57d05c18831e04dc14efe2acd33451/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f6a6d7261736865642f7a6b7465636f)](https://camo.githubusercontent.com/56cbeab81b8ed82186c1d016b3c68926eb57d05c18831e04dc14efe2acd33451/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f6a6d7261736865642f7a6b7465636f)[![GitHub closed pull requests](https://camo.githubusercontent.com/0a97f500f3d36b199f23df8d8cfb4ec0c3e2a6ed3010685bc9ce48edaf531b03/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722d636c6f7365642f6a6d7261736865642f7a6b7465636f)](https://camo.githubusercontent.com/0a97f500f3d36b199f23df8d8cfb4ec0c3e2a6ed3010685bc9ce48edaf531b03/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722d636c6f7365642f6a6d7261736865642f7a6b7465636f)

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
-------------

[](#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
------------

[](#installation)

To use the ZKTeco library, you need to include it in your PHP project. You can install it via Composer:

```
composer require jmrashed/zkteco
```

Enabling PHP Sockets
--------------------

[](#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

[](#prerequisites-1)

- PHP installed on your server
- Access to the `php.ini` configuration file
- Basic knowledge of server administration

### Steps

[](#steps)

1. **Check PHP Installation**: Verify that PHP is installed on your server by running `php -v` in your terminal or command prompt.
2. **Enable Sockets Extension**: Edit the `php.ini` file to enable the sockets extension. Find the following line:

```
;extension=sockets
```

Remove the semicolon at the beginning of the line to uncomment it:

```
    extension=sockets
```

3. **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).
4. **Verify Installation**: Create a PHP file (e.g., `test.php`) with the following contents:

    ```
