kamshory / ZKLibrary

ZKLibrary is PHP library for reading and writing data to attendance device using UDP protocol. This library useful to comunicate between web server and attendance device directly without addition program. This library is implemented in the form of class. So that you can create an object and use it functions.
GNU General Public License v2.0
198 stars 179 forks source link

Very Long Time Getting Data From Device #21

Open wahib05 opened 6 years ago

wahib05 commented 6 years ago

I used this library but it was very long time to get data from device (60-90 seconds), I think all many resource in web services would be taken, so All Aplication in same web services waiting for getting data finish.

Could you give me solution ? Thanks u very much

wahib05 commented 6 years ago

Ok, i got solution for this issue, thanks

kemboidickson commented 6 years ago

@wahib05 what was your solution?

termers commented 6 years ago

@wahib05 can u share us your solution? I'm also having this kind of long time execution of pulling data from the device

wahib05 commented 6 years ago

for implementasion i just call:

$zk = new ZKLibrary('172.16.0.201', 4370); $zk->connect(); $zk->getAttendance(); it this only need 1 second to get data in device

I dont call : // $zk->disableDevice(); //$zk->clearAttendance(); //$zk->enableDevice(); //$zk->disconnect(); and other method,

may be device can be handle with that method so long time for execution, regard

termers commented 6 years ago

@wahib05 I have tried your solution and heck yea.. it is lightning fast... I only commented the disableDevice() & enableDevice() functions...

kamshory commented 6 years ago
$zk->disableDevice(); 

only to prevent user check while application read attendance data and the check is not recorded. When $zk->disableDevice(); called, device will display text "Working..." so user can wait until the process done.

javidu commented 5 years ago

@wahib05 Hi. I have a zkt eco 40 device but I cant conect it yet. First I would like to know what device do you have. Second, do you implement the same sdk code without change it?.

Please help me :)

wombiro commented 4 years ago

@wahib05 Hi. I have a zkt eco 40 device but I cant conect it yet. First I would like to know what device do you have. Second, do you implement the same sdk code without change it?.

Please help me :)

I have zkteco k40 and it's working very well with this clasd

Fajendagba-Joy commented 2 years ago

@wombiro Please how did you connect it. I mean get the library working locally

zaid2255 commented 1 year ago

I've zkteco fv18, in localhost it's working but when I test in the server this error is showing (Warning: socket_sendto(): Unable to write to socket [1]: Operation not permitted in /home/irydyuct/jccallcentre.com/emplogin/zk4/zklib/src/Connect.php on line 27) . How to solve this issue

shariqali91 commented 1 year ago

@wahib05 Hi. I have a zkt eco 40 device but I cant conect it yet. First I would like to know what device do you have. Second, do you implement the same sdk code without change it?. Please help me :)

I have zkteco k40 and it's working very well with this clasd

I have zkteco k40 but its not working. i have copy this code but not working. ping pong recevied from device. but not working

Ehtasham-CEF commented 7 months ago

I've zkteco fv18, in localhost it's working but when I test in the server this error is showing (Warning: socket_sendto(): Unable to write to socket [1]: Operation not permitted in /home/irydyuct/jccallcentre.com/emplogin/zk4/zklib/src/Connect.php on line 27) . How to solve this issue

SAME issue, i think this lib does not work while accessing externally