PHPackages                             bishwajitcadhikary/zkteco-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bishwajitcadhikary/zkteco-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bishwajitcadhikary/zkteco-sdk
=============================

ZKTeco Laravel Library

v1.0.0(2y ago)0471MITPHP

Since May 30Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

ZKTeco - Laravel Library
========================

[](#zkteco---laravel-library)

[![Issues](https://camo.githubusercontent.com/4e604101521c9136e72e2748f73bd95286a569b996956d53067402fa461c8e9d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f72616968616e6166726f7a2f7a6b7465636f3f7374796c653d666c61742d737175617265)](https://github.com/raihanafroz/zkteco/issues)[![Forks](https://camo.githubusercontent.com/3555143cc20329c161f6f8c1d07c758b7b7497314d5fe86ad47e16eebe941ed3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f72616968616e6166726f7a2f7a6b7465636f3f7374796c653d666c61742d737175617265)](https://github.com/raihanafroz/zkteco/network/members)[![Stars](https://camo.githubusercontent.com/d2360dd2018319ea9ed95c9c8430f1021c2af1c65d13b9cc0d439d418de9fa7c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f72616968616e6166726f7a2f7a6b7465636f3f7374796c653d666c61742d737175617265)](https://github.com/raihanafroz/zkteco/stargazers)[![Total Downloads](https://camo.githubusercontent.com/533c8f7eb0036abcdaeea9b5bc66ce57093523ec9fc8b50e31e359a845f906cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726174732f7a6b7465636f3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rats/zkteco)[![License](https://camo.githubusercontent.com/30ab66d7c1534e0606364d2927a9de2ab272e95def08d4f2c016ec0024433714/68747470733a2f2f706f7365722e707567782e6f72672f726174732f7a6b7465636f2f6c6963656e73652e737667)](https://packagist.org/packages/rats/zkteco)

The `rats/zkteco` package provides easy to use functions to ZKTeco Device activities.

**Requires:** **Laravel** &gt;= **6.0**

**License:** MIT or later

Installation:
-------------

[](#installation)

You can install the package via composer:

```
composer require rats/zkteco
```

The package will automatically register itself.

You have to enable your php socket if it is not enable.

Usage
-----

[](#usage)

1. Create a object of ZKTeco class.

```
    use Rats\Zkteco\Lib\ZKTeco;

//  1 s't parameter is string $ip Device IP Address
//  2 nd  parameter is integer $port Default: 4370

    $zk = new ZKTeco('192.168.1.201');

//  or you can use with port
//    $zk = new ZKTeco('192.168.1.201', 8080);

```

2. Call ZKTeco methods

- **Connect**

```
//    connect
//    this return bool
    $zk->connect();
```

- **Disconnect**

```
//    disconnect
//    this return bool

    $zk->disconnect();
```

- **Enable Device**

```
//    enable
//    this return bool/mixed

    $zk->enableDevice();
```

> **NOTE**: You have to call after read/write any info of Device.

- **Disable Device**

```
//    disable
//    this return bool/mixed

    $zk->disableDevice();
```

> **NOTE**: You have to call before read/write any info of Device.

- **Device Version**

```
//    get device version
//    this return bool/mixed

    $zk->version();
```

- **Device Os Version**

```
//    get device os version
//    this return bool/mixed

    $zk->osVersion();
```

- **Power Off**

```
//    turn off the device
//    this return bool/mixed

    $zk->shutdown();
```

- **Restart**

```
//    restart the device
//    this return bool/mixed

    $zk->restart();
```

- **Sleep**

```
//    sleep the device
//    this return bool/mixed

    $zk->sleep();
```

- **Resume**

```
//    resume the device from sleep
//    this return bool/mixed

    $zk->resume();
```

- **Voice Test**

```
//    voice test of the device "Thank you"
//    this return bool/mixed

    $zk->testVoice();
```

- **Platform**

```
//    get platform
//    this return bool/mixed

    $zk->platform();
```

- **Firmware Version**

```
//    get firmware version
//    this return bool/mixed

    $zk->fmVersion();
```

- **Work Code**

```
//    get work code
//    this return bool/mixed

    $zk->workCode();
```

- **SSR**

```
//    get SSR
//    this return bool/mixed

    $zk->ssr();
```

- **Pin Width**

```
//    get  Pin Width
//    this return bool/mixed

    $zk->pinWidth();
```

- **Serial Number**

```
//    get device serial number
//    this return bool/mixed

    $zk->serialNumber();
```

- **Device Name**

```
//    get device name
//    this return bool/mixed

    $zk->deviceName();
```

- **Get Device Time**

```
//    get device time

//    return bool/mixed bool|mixed Format: "Y-m-d H:i:s"

    $zk->getTime();
```

- **Set Device Time**

```
//    set device time
//    parameter string $t Format: "Y-m-d H:i:s"
//    return bool/mixed

    $zk->setTime();
```

- **Get Users**

```
//    get User
//    this return array[]

    $zk->getUser();
```

- **Set Users**

```
//    set user

//    1 s't parameter int $uid Unique ID (max 65535)
//    2 nd parameter int|string $userid ID in DB (same like $uid, max length = 9, only numbers - depends device setting)
//    3 rd parameter string $name (max length = 24)
//    4 th parameter int|string $password (max length = 8, only numbers - depends device setting)
//    5 th parameter int $role Default Util::LEVEL_USER
//    6 th parameter int $cardno Default 0 (max length = 10, only numbers

//    return bool|mixed

    $zk->setUser();
```

- **Clear All Admin**

```
//    remove all admin
//    return bool|mixed

    $zk->clearAdmin();
```

- **Clear All Users**

```
//    remove all users
//    return bool|mixed

    $zk->clearAdmin();
```

- **Remove A User**

```
//    remove a user by $uid
//    parameter integer $uid
//    return bool|mixed

    $zk->removeUser();
```

- **Get Attendance Log**

```
//    get attendance log

//    return array[]

//    like as 0 => array:5 [▼
//              "uid" => 1      /* serial number of the attendance */
//              "id" => "1"     /* user id of the application */
//              "state" => 1    /* the authentication type, 1 for Fingerprint, 4 for RF Card etc */
//              "timestamp" => "2020-05-27 21:21:06" /* time of attendance */
//              "type" => 255   /* attendance type, like check-in, check-out, overtime-in, overtime-out, break-in & break-out etc. if attendance type is none of them, it gives  255. */
//              ]

    $zk->getAttendance();
```

- **Clear Attendance Log**

```
//    clear attendance log

//    return bool/mixed

    $zk->clearAttendance();
```

end
===

[](#end)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1079d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/05f9a72ab9f1685e2d1e829714d6c3470ea38acc3bdf3b6608ac5edb4997b835?d=identicon)[bishwajitcadhikary](/maintainers/bishwajitcadhikary)

---

Top Contributors

[![bishwajitcadhikary](https://avatars.githubusercontent.com/u/55208330?v=4)](https://github.com/bishwajitcadhikary "bishwajitcadhikary (1 commits)")

### Embed Badge

![Health badge](/badges/bishwajitcadhikary-zkteco-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/bishwajitcadhikary-zkteco-sdk/health.svg)](https://phpackages.com/packages/bishwajitcadhikary-zkteco-sdk)
```

###  Alternatives

[skywarth/chaotic-schedule

Randomize scheduled command execution time and date intervals

12142.3k](/packages/skywarth-chaotic-schedule)[raoul2000/yii2-wizflow

The wizard UI pattern implemented using yii2-workfl

144.2k](/packages/raoul2000-yii2-wizflow)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
