Download the PHP package sanshin/sanshin-zkteco-sdk without Composer

On this page you can find all versions of the php package sanshin/sanshin-zkteco-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sanshin-zkteco-sdk

Issues Stars Forks

Zkteco Laravel SDK

This package easy to use functions to ZKTeco Device activities with laravel framework.

Requires: Laravel >= 5.0

License: MIT

About SDK

Laravel ZKLibrary is PHP Library for ZK Time & Attendance Devices. This library is design to reading and writing data to attendance device (fingerprint, face recognition or RFID) using UDP protocol. This library is useful to comunicate between web server and attendance device directly without any addition program. This library is implemented in the form of class. So that you can create an object and use it functions.

Web server must be connected to the attendance device via Local Area Network (LAN). The UDP port that is used in this communication is 4370. You can not change this port without changing firmware of the attendance device. So, you just use it.

The format of the data are: binary, string, and number. The length of the parameter and return value must be vary.

This package is compatible with Laravel 5.* 6.* 7.* 8.*

Installation

Begin by installing this package through Composer. Just run following command to terminal-

composer require sanshin/sanshin-zkteco-sdk

Once this operation completes, the final step is to add the service provider. Open config/app.php, and add a new item to the providers array.

'providers' => [

        // .........................
        Sanshin\Zkteco\ZktecoServiceProvider::class,

    ]

If you want to change Zkteco settings , you need to publish its config file(s). For that you need to set ip address in the terminal-

php artisan vendor:publish

Usages

Create an object of ZktecoLib class.
    use Sanshin\Zkteco\Http\Library\ZktecoLib;

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

    $zk = new ZktecoLib(config('zkteco.ip'));

//  or you can use with port
//    $zk = new ZktecoLib(config('zkteco.ip'), 8080);

ZktecoLib Method

Example

    use Sanshin\Zkteco\Http\Library\ZktecoLib;

    class ZktecoController extends Controller
    {

        public function index()
        {
            $zk = new ZktecoLib(config('zkteco.ip'),config('zkteco.port'));
            if ($zk->connect()){
            $attendance = $zk->getAttendance();
            return view('zkteco::app',compact('attendance'));
            }

        }

        public function addUser()
        {
            $zk = new ZktecoLib(config('zkteco.ip'),config('zkteco.port'));
            if ($zk->connect()){
                $role = 14; //14= super admin, 0=User :: according to ZKtecho Machine
                $users = $zk->getUser();
                $total = end($users);
                $lastId=$total[3]+1;
                $zk->setUser($lastId, '11', 'super', '234', $role);
                return "Add user success";
            }
            else{
                 return "Device not connected";
            }
        }

    }

All versions of sanshin-zkteco-sdk with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sanshin/sanshin-zkteco-sdk contains the following files

Loading the files please wait ....