Open test8git opened 7 years ago
You can use setUser function On example bellow, there are 3 users.
Kamshory Role = Super Manager Serial ID = 1 User ID = 100001 Password = password1 (optional)
Mas Roy Role = User Serial ID = 2 User ID = 100002 Password = password2 (optional)
Linda Role = User Serial ID = 3 User ID = 100003 Password = password3 (optional)
If the data is from database, you can repeat $zk->setUser for each data but only in once connection.
<?php
include "zklibrary.php";
$zk = new ZKLibrary('192.168.1.102', 4370);
$zk->connect();
$zk->disableDevice();
$zk->setUser(1, '100001', 'Kamshory', 'password1', 14); // as super manager
$zk->setUser(2, '100002', 'Mas Roy', 'password2', 0); // as user
$zk->setUser(3, '100003', 'Linda', 'password1', 0); // as user
$zk->enableDevice();
?>
Before you write data to the device, you must find out the last Serial ID. The new user must have Serial ID larger than the biggest existing Serial ID.
Thank you very much sir. But i want to read data from the device (for new user) & store into database. So that next time when the same user login, i can match with stored data.
Thakns!
If you want to get user data from the device and save it to the database, you can use getUser function. The password is plain text. You can use hash function before you save it into the database for security reason.
And how i will send finger print data ? $received_data = ? $zk = new ZKLibrary('192.168.137.105', 4370,null,0,???);
To get data from fingerprint and save it to the database, see code bellow:
<?php
include "zklibrary.php";
$zk = new ZKLibrary('192.168.1.102', 4370);
$zk->connect();
$zk->disableDevice();
$users = $zk->getUser();
foreach($users as $key=>$user)
{
$sql = "insert into `person` (`uid`, `id`, `name`, `level`, `password`) values
('$key', '$user[0]', '".addslashes($user[1])."', '$user[2]', '".addslashes($user[3])."');";
mysql_query($sql);
}
$zk->enableDevice();
?>
Thank you very much, I will check and let you know. 👍
Good luck. If you have a problem, tell me please.
Brother can you help me how can get data attendance insert to database thanks so much brother
First, you must define your own database to save the data. Then, you create a PHP script to load data from device and insert it into database.
<?php
include "zklibrary.php";
$zk = new ZKLibrary('192.168.1.102', 4370);
$zk->connect();
$zk->disableDevice();
$data = $zk->getAttendance();
foreach($data as $key=>$value)
{
$uid = $value[0];
$id = $value[1];
$state = $value[2];
$time = $value[3];
$sql = "insert into attendace(uid, id, state, time) values
('$uid', '$id', '$state', '$time')
";
mysql_query($sql);
}
?>
mas terimakasih banyak mas. atas pencerahannya
On Fri, Dec 1, 2017 at 9:53 PM, Kamshory, MT notifications@github.com wrote:
First, you must define your own database to save the data. Then, you create a PHP script to load data from device and insert it into database.
<?phpinclude "zklibrary.php";$zk = new ZKLibrary('192.168.1.102', 4370);$zk->connect();$zk->disableDevice();$data = $zk->getAttendance();foreach($data as $key=>$value){ $uid = $value[0]; $id = $value[1]; $state = $value[2]; $time = $value[3]; $sql = "insert into attendace(uid, id, state, time) values ('$uid', '$id', '$state', '$time') "; mysql_query($sql);}?>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kamshory/ZKLibrary/issues/6#issuecomment-348514795, or mute the thread https://github.com/notifications/unsubscribe-auth/Agk8Ilu36K0u59F7hH7sgcho5wET9T18ks5s8BMEgaJpZM4PxPJw .
you are welcome
I have successfully read fingerprint template from the device but failed when write it. I have read all reference on hundreds website but still not working. I use Solution X100-C
for reading getUserTemplate($uid, $finger) for writing setUserTemplate($data)
I invite all of you to contribute to this library.
Hello, Thank you for your nice library it's very helpful 👍 I have a question please about attendance How can i know in or out record ?
Thanks in advance
You can do it on your application. The first check on the day is check in and the last check on the day is check out. So you need at least two records on one day.
Hello, Thanks for your work!, but I have a problem, when I try tu put a comm_key, where can I put this info, because when I develop some tool in c sharp, works obviously, but I don't know where or how I can add this info in your library, please help me.
Hello, It is working nice. But i am facing some problem for loading time. When i wan to connect at least 20 device by ip address , it is working slow. How can i connect multiple device and get attendance data with very much fast. I am saving data into a file.
Thanks for your help
How machine automatically push data to the server
Hello Sir, am using secureye biometric machine (S-B7CB). I have different kinds of bio-metric machine and am finding common data downloader for all machines. When am trying to connect biometric machine through your zk php code, its not work. after checking its can not connect to machine. It gives failed to connect. Please help me
Hello, How to active or inactive register user without delete enroll user from the device? Also how to enroll user with RFID card number. thanks in advance
You can not do it to the device but you can do it from your application.
hello, is there any gateway or api to handle machine data like punches through PHP language or any other languages for all biometric machines.
Thanks & Regards, Santosh Rankhambe Project Manager at SALGEM INFOIGY Tech Pvt Ltd. +91 888 837 1993
On Tue, Jul 31, 2018 at 12:21 PM, Kamshory, MT notifications@github.com wrote:
You can not do it to the device but you can do it from your application.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kamshory/ZKLibrary/issues/6#issuecomment-409114702, or mute the thread https://github.com/notifications/unsubscribe-auth/AYiOPmNqByhxTWfRyOyFFgYFvqZg2Y63ks5uL_6OgaJpZM4PxPJw .
how the step if i want to send data to fingerprint device from other fingerprint device ?
insert into presensi berdasarkan range tanggal presensi gmna pak?https://github.com/kamshory/ZKLibrary/issues/6#issuecomment-348514795
@kamshory hello sir... is it possible to get data from specific user?
No. You must read all data because library not support filter data
how about getting the last data entered sir??
first, you must read your data from your device then save it into you database. second, you can read data from your database as you want.
First, you must define your own database to save the data. Then, you create a PHP script to load data from device and insert it into database.
<?php include "zklibrary.php"; $zk = new ZKLibrary('192.168.1.102', 4370); $zk->connect(); $zk->disableDevice(); $data = $zk->getAttendance(); foreach($data as $key=>$value) { $uid = $value[0]; $id = $value[1]; $state = $value[2]; $time = $value[3]; $sql = "insert into attendace(uid, id, state, time) values ('$uid', '$id', '$state', '$time') "; mysql_query($sql); } ?>
I can not read the data from this code, although reading the user list is still possible. Please help me!
Not fetching data at remote server working at local server can you guide how we can access device data at remote server.
@kamshory Hello sir, I am using ZK F22 Excuse me, I still have problem in code: $zk->connect(); I had configured my device IP & Port, then I input into source code. but the result always false, can you help me, how to resolve this?
Thanks you before sir
can you use "telnet" to test the connection?
@kamshory I have not tried using it. But I just ask to Seller to give me latest firmware with SOAP support. I had upgraded my device firmware last night. Has already done. Notes:
Thanks you so much Sir.
Zaenal Mutaqin (PHP Developer)
did you solve the issue ?
On Tue, 2 Oct 2018 at 06:53, mutaqinzae notifications@github.com wrote:
@kamshory https://github.com/kamshory I have not tried using it. But I just ask to Seller to give me latest firmware with SOAP support. I had upgraded my device firmware last night. Has already done. Notes:
- We have to confirm to seller about our Serial Number device to get latest firmware.
Thanks you so much Sir.
Zaenal Mutaqin (PHP Developer)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kamshory/ZKLibrary/issues/6#issuecomment-426282059, or mute the thread https://github.com/notifications/unsubscribe-auth/ARwmAN53ZVOMxBKgLPXQgkAYkEYUoRwLks5ug2_hgaJpZM4PxPJw .
--
Thanks & Regards, Malik Atiq(Software Developer) Mob: 033 <0302%203957635>36002149
@kamshory hello!
Do you finish below function ?
setUserTemplate($data)
If you do, please tell me what is $data means? and how can I encode fingerprint data to it.
No. I hope somebody can help me to write program code for this function.
How can get getUserTemplate() data
How can get $finger in my php project
I have test getUserTemplate on my local machine but it useless because fail when I try to write the user template. I hope somebody can help to write setUserTemplate code.
how can update user data from php script
how can display date between(two date) attendance report
you must store the attendance to your database and fiter it using SQL command.
When I connect by Real ip from server ,I can not, Plz,suggest me
facing same issue
On Mon, 14 Jan 2019 at 05:02, HM ISAHAQ notifications@github.com wrote:
When I connect by Real ip from server ,I can not, Plz,suggest me
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kamshory/ZKLibrary/issues/6#issuecomment-453997257, or mute the thread https://github.com/notifications/unsubscribe-auth/ARwmAH_2yFowjWmtyRWQkv1rYCNc12x3ks5vDH_ugaJpZM4PxPJw .
--
Thanks & Regards, Malik Atiq(Software Developer) Mob: 033 <0302%203957635>36002149
Sir i need your help how to read RFID Card Number And store it on other devices.
How do you set time
i have a WL 10 zktecho device that device is wifi how i get data from this device and insert into database i use this code but does not get data please help me.thanks. <?php $con=mysqli_connect("localhost","root","","zk_tech"); include "zklibrary.php"; $zk = new ZKLibrary('192.168.1.102', 4370); $zk->connect(); $zk->disableDevice();
$data = $zk->getAttendance(); foreach($data as $key=>$value) { $uid = $value[0]; $id = $value[1]; $state = $value[2]; $time = $value[3]; $sql = "insert into attendace(uid, s_id, state, time) values ('$uid', '$id', '$state', '$time') "; mysqli_query($con,$sql); } ?>
I have a problem when I upload files to the server and run file it shows Request timeout but when I run on local it works fine can you please tell me how I solve the problem I have already increase my server timeout request ?
I have the same problem too. You can separate the data into several part. e.g you upload 100 data for each request and repeat it until all data uploaded to your online server.
Sorry, anybody gots solutions to function setUserTemplate? I have tried everything, still not working =(
Hi, could you please explain me, that how (and in which format) i will send data from device to test.php or zkLibrary? How to use the library? Please describe with an example. Thanks