![zk time attendance zk time attendance](https://zkteco.eu/sites/default/files/styles/share/public/field/image/zkteco_europe_g3_pro_the_ultimate_contactless_biometric_time_attendance_device_01.jpg)
Valid params supported by TAD class are: com_key, pin, time, template, name, password, group, privilege, card, pin2, tz1, tz2, tz3, finger_id, option_name, date, size, valid, valueĪs you can see, params names are so intuitive and easy to remember. Using associative arrays is a "more verbose way" that helps you to remember which params you have to pass. TAD class uses associative arrays as way to pass params to the methods.
![zk time attendance zk time attendance](https://www.orbitadigital.com/279347-large_default/zkteco-zk-us10c-id-time-attendance-control-fingerprints-em-rfid-card.jpg)
Some methods need that you set up some parameters prior you can call them. Even though you have 2 classes, you do not have to be worried about which method is been calling using SOAP api or through PHP_ZKLib. All methods that use UDP Protocol are implemented by PHP_ZKLib class. SOAP API is implemented by TADSoap class. 'description' => 'TAD1', // 'N/A' by default. You can customize TAD object traits passing an options array: '192.168.0.1', // '169.254.0.1' by default (totally useless!!!). Or you can get a TAD object in one single step (valid only in PHP 5.4+): '192.168.0.1']))->get_instance() '192.168.100.156', 'com_key'=>0]))->get_instance() įirst, instantiate a TADFactory object, then use it to create a TAD object. Require/Include autoload.php file in the index.php of your project or whatever file you need to use TAD-PHP classes: Inside of it, you'll see the autoload.php The command above will generate a folder called vendor.
#Zk time attendance code#
It's also able to build automatically *autoloaders* if you wrote down your code using PSR-0 and/or PSR-4 standards, avoiding you headaches about everything related to loading classes.
#Zk time attendance download#
Getting started Setting up the environmentĪfter download TAD-PHP, you have 2 ways to get your enviroment configured to use the classes: ComposerĬomposer is the PHP's package manager and is the recommended way to get packages for your projects. PHPUnit to execute the test suite (optional).Īll ZK Time & Attendance devices with web server built-in (with ZEM600 or less). The class decides about when runs the method invoked using TAD class or PHP_ZKLib class. PHP_ZKLib class it's been fully integrated, after a refactoring process taking out all duplicated code (DRY).įor practical purposes, you don't have to be worried about when to use TAD class or PHP_ZKLib class because you only have to get a TAD instance (as shown below) and call any of its methods available. This class takes a different approach to "talk to the device": it uses UDP protocol at device standard port 4370. For these situations, TAD class implement them by Providers\TADZKLib class ( - ). There are some SOAP functions supported by ZK devices that it's suppossed, according to the official docs (which incidentally it's very limited and so poor!!!) must show an expected behaviour, but when they are invoked don't work like is expected, so they become useless (e.g. Specifically TAD class exposes the following 35 methods: get_date, get_att_log, get_user_info, get_all_user_info, get_user_template, get_combination, get_option, get_free_sizes, get_platform, get_fingerprint_algorithm, get_serial_number, get_oem_vendor, get_mac_address, get_device_name, get_manufacture_time, get_antipassback_mode, get_workcode, get_ext_format_mode, get_encrypted_mode, get_pin2_width, get_ssr_mode, get_firmware_version, set_date, set_user_info, set_user_template, delete_user, delete_template, delete_data, delete_user_password, delete_admin, enable, disable, refresh_db, restart, and poweroff.Īll methods above are implemented by 2 classes: Providers\TADSoap and Providers\TADZKLib. TAD: A class that implements an interface to interacts with ZK Time & Attendance devices.ĭocumentation found about ZK SOAP api is very limited or poor, however TAD class implements most SOAP functions supported by ZK devices. A simple PHP class to interacts with ZK Time & Attendance Devices.