Giter Site home page Giter Site logo

zkteco-doorunlock's Introduction

Zkteco-Doorunlock

这是一个Zkteco系列考勤机的非官方软件库。采用纯php编写,支持设置通信密码,你可以使用它实现通过Website方式轻松的控制你的zkteco系列考勤机,而不需要安装官方SDK。

此代码由 Forgot Fish 改编自国外一大神用Python写的 pyzk。此代码并未没有实现全部的功能,因为我只是用来实现Zkteco-F18门禁机的远程开门,并且没有实现TCP连接,仅实现了UDP连接,需要的可以自行扩展。

Demonstration

//引入门禁库
include("zkteco.php");

//初始化门禁
//$zkteco = new zkteco("ipaddress","port", "password");
$zkteco = new zkteco("192.168.100.201","4370", "0");

//连接门禁
$conn = $zkteco->connect();

print("<pre>");
print("\nconnect:  ".$conn["text"]);

if (!$conn['status']) return;

print("\n\nopen door:  ".$zkteco->unlock()["text"]);
print("\n\nplay voice: ".$zkteco->playVoice()["text"]);
print("\n\ndisconnect: ".$zkteco->disconnect()["text"]);

//$zkteco->unlock($time);      //default $time = 3
//$zkteco->playVoice($index);  //default $index = 0

zkteco-doorunlock's People

Contributors

bytesharky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.