Closed junaidranjha closed 4 years ago
I have test it using Solution X100-C and there is no problem. Can you tell me about your device?
Thanks for the reply my device name is ZKT Iface 302. As i told earlier i am able to connect the device with help of this library but the problem is when i get attendance data through its getattendance() method i only get data from 31st of last month while i neeed more data as i require data of last whole month
On Tue, Sep 19, 2017 at 2:23 PM, Kamshory, MT notifications@github.com wrote:
I have test it using Solution X100-C and there is no problem. Can you tell me about your device?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kamshory/ZKLibrary/issues/4#issuecomment-330482074, or mute the thread https://github.com/notifications/unsubscribe-auth/Ac0-wJdM67rG2Jw4lXasxAAZeAlhueyDks5sj4gjgaJpZM4PXS0V .
How much data that you can retrieve using this library? In my case, I can get more than 3000 attendance data and not limited by date.
I am getting like 3712 records right now. The problem is i don,t need data of this month but the previous month i have applied those checks in my php code but that only shows me data of 31st and of last month and that is beacause the oldest record i can see from this library data is 31st of last month and then onwards.
Oh. I see. You can read data from the device and save it into you database. You can clear attendance data on your device after you save it on the database. Then you can read data from your database and you can filter it by time and others.
Is there a way to get all data present on the device? I mean is there any other method rather than get attendance to get whole data of device
You can not filter attendance data when you get it directly from the device because the firmware is not designed for this purpose.
Yes, i understand that what I am doing is getting data from get attendance method but this method is not able to show whole data like from the start of the day is there any other method to get whole data from a database of the device?
If you want to add filter, you can modify the library but you MUST read all data first. You can skip data if it not match with your filter. So the function will not return the skipped data.
So you are saying get attendance method of this library doesn't have a limitation and it shows all the data(from beginning) right?
Yes.
Alright, thanks a lot for your help.
OK. You are welcome. I hope this library helps you.
Yeah, it really helped me a lot keep doing wonders like this. Thumbs Up.
@kamshory & @junaidranjha Sir please guide me that how I differentiate check in check out of a user in my attendance.
brother how i can get all data attandence check in and chect out thanks so much brother
Dear @harisklana I know its too late to reply but it never too late to mend.Any how please visit the following link and use that library. https://github.com/dnaextrim/php_zklib
You can use code bellow:
<?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);
}
//$zk->clearAttendance();
?>
I use primatech machine. is it also?
I think so.
I think so.
well with the db insertion code you wrote above it inserts 0 in status... Which is incorrect
Hi, excelent your job. Do you know if there is something to be able to save in real time using the adms? Thank you very much
Hi, i have two ZKTeco attendance devices. Both are ZKTeco Multi-Bio 800. One of them is manufactured in 2016 and another in 2017. I can get user data from both devices but only getting attendance log from the device manufactured in 2016. I don't know whats wrong with the new device. It is not sending attendance log. Could you please help me to figure out the issue. The software shipped with the device-2017 works properly and fetches attendance log. Please help me to figure out the issue. Thanks in advance.
@kamshory , saya sdah pakai zklib anda dan berhasil ambil data.
Hi , we got a software that manage Zkteco pull devices , does anybody has http get / post protocol to manage Zkteco devices with ADMS function ?
can anyone help this error. thanks in advance
You have an internal error on your script or server configuration.
You have an internal error on your script or server configuration.
I'll try this zklib
but no result of info.. Im using 5000T-C Granding TFT.
why the attendance time "1970-01-01 01:00:00/2000-01-01 01:00:00" of attendance data are wrong. This must be current date and time. how will i fix it ? Could u help me?
The results of attendance data with wrong attendance time from fingerprint. Could u tell me how to fix it?
It can be time encoding on your version of the firmware. You can fix it by modify the function
private function decodeTime($data)
{
$second = $data % 60;
$data = $data / 60;
$minute = $data % 60;
$data = $data / 60;
$hour = $data % 24;
$data = $data / 24;
$day = $data % 31+1;
$data = $data / 31;
$month = $data % 12+1;
$data = $data / 12;
$year = floor( $data + 2000 );
$d = date("Y-m-d H:i:s", strtotime($year.'-'.$month.'-'.$day.' '.$hour.':'.$minute.':'.$second));
return $d;
}
This code is already added. But the result attendance time is still wrong. How will i fix it?
I mean that you MUST change the code by yourself. You MUST know the time encoding of your firmware. You can debug your code before you save your data to the database.
Hi @kamshory is there any way to check if my device firmware supports filtering data directly from the device.?
e-time track lite windows app works fine when fetching all data, but my PHP code times out after 15 mins. So, it would be good to take only small amount of data out of device (it is currently holding around 100K records)
please help
Hi Kmshory,
We are looking for Push Sdk documentation , can you kindly share such doc with us?
Thanks in advance .
Ivan
El El sáb, 13 oct. 2018 a las 02:48, Kamshory, MT notifications@github.com escribió:
I mean that you MUST change the code by yourself. You MUST know the time encoding of your firmware. You can debug your code before you save your data to the database.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kamshory/ZKLibrary/issues/4#issuecomment-429516532, or mute the thread https://github.com/notifications/unsubscribe-auth/AXMYwiipasqAeOlkT3Y69D7UKWCRD0CXks5ukYzAgaJpZM4PXS0V .
-- Enviado con Gmail Mobile
Hello, I have the ZKTeco SF200 TCP, and I have not been able to make it work. Any recommendation? Thanks...
Hi, could you please help me how can i get current month data?
brother how i can get all data attendance check in and check out thanks so much brother
brother have you got this work? i need the same and also i want to get the data for current month only?
brother how i can get all data attendance check in and check out thanks so much brother
brother have you got this work? i need the same and also i want to get the data for current month only?
By get attendance you get all the data now it isn't a good way but in my case in foreah loop of get_attendance() data add an if check regarding the date
@muzafar First of all you need to retrieve the data from your device/machine and populate that into your database.From there you may reach to your goal.But if you are not doing like this then you will retrieve the data as a whole and then will going to filter that. And if you the solution besides this please share.
@muzafar First of all you need to retrieve the data from your device/machine and populate that into your database.From there you may reach to your goal.But if you are not doing like this then you will retrieve the data as a whole and then will going to filter that. And if you the solution besides this please share.
$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); } In code written above you see we are storing whole data in database now in this data array you also get date so just put an if condition on the date and do whatever with the data of your choice
@muzafar First of all you need to retrieve the data from your device/machine and populate that into your database.From there you may reach to your goal.But if you are not doing like this then you will retrieve the data as a whole and then will going to filter that. And if you the solution besides this please share.
Of course its the feasible solution.
Thanks @junaidranjha and @RahamSher. Actually the problem is that there is almost 56 thousand records in machine and when i try to run the script then due to heavy amount of data the browser load and load and hanged. What actually i want is two things. first to get check in and check out date, currently there is nothing to differentiate whether it is check in or check out. 2nd if possible, only current month attendance through getAttendance method.
@muzafar there will be user id in data the first time for the user in a day will be check in and last time of a user in a day is checkout i myself got stuck in this thing as there is no status present
@junaidranjha you mean if there are two entries for a day of same users, the first one will be check in and 2nd one will be checkout?
@muzafar yes exactly,that's what it is and in case we have more than two entries of a user then first entry will be a checkin and last will be a checkout
Thanks @junaidranjha for your valuable time, I got it, but I think its not a good way and they must have a status column to differentiate check in and check out because its already in the machine.
@muzafar Yeah they do have a column but i wasn't able to differentiate checkin and checkout from their status column value so just shared a way how i solved that
my device is connected i can get user data and attendance data but problem is i am not able to get attendance of last whole month its like if i am accessing getattendance() it returns data from last months 31st uptill now while i want it to get all the data.