Comments (9)
this might be because of the request time out
i haven't tested the lib yet, i'm just assuming that
------------- ^^
this have nothing to do with the request time
has to do with the code in zklib/zkuser.php
it does loop over the whole users, but then doesn't get all of em
anyways what you could do is change the way array loop on them here
$users[$uid] = array($userid, $name, intval( $role ), $password);
to
$users[$userid] = array($userid, $name, intval( $role ), $password);
or even an empty [] which will do the same
from php_zklib.
sorry I could not develop this library again because I already resigned from where I work and I do not have attendance machine to develop this library
from php_zklib.
Thank you very much @dnaextrim you already made wonderful work with the lib, and whenever any question will come up i'll try helping as much as i can ;)
from php_zklib.
Thanks @MostafaNaguib
from php_zklib.
Hello @MostafaNaguib
I use python_zklib and I got several limitations :
- The last attendance can't be downloaded.
- Can't set cardnumber of a user.
- Can't set a user with uid > 255.
I realy need your help.
Thanks to help me to fixe this issues.
Regards.
from php_zklib.
file zkuser.php
To read user, replace
$uid = hexdec( substr($u[1], 0, 4) ).' ';
with
$u1 = hexdec( substr($u[1], 2, 2) );
$u2 = hexdec( substr($u[1], 4, 2) );
$uid = $u1+($u2*256);
To write user, replace
$command_string = str_pad(chr( $uid ), 2, chr(0)).chr($role).str_pad($password, 8, chr(0)).str_pad($name, 28, chr(0)).str_pad(chr(1), 9, chr(0)).str_pad($userid, 8, chr(0)).str_repeat(chr(0),16);
with
$byte1 = chr((int)($uid % 256));
$byte2 = chr((int)($uid >> 8));
$command_string = $byte1.$byte2.chr($role).str_pad($password, 8, chr(0)).str_pad($name, 28, chr(0)).str_pad(chr(1), 9, chr(0)).str_pad($userid, 8, chr(0)).str_repeat(chr(0),16);
file zkattendance.php
To read log, replace
$uid = hexdec( substr( $u[1], 0, 6 ) );
$uid = explode(chr(0), $uid);
$uid = intval( $uid[0] );
with
$u1 = hexdec( substr($u[1], 4, 2) );
$u2 = hexdec( substr($u[1], 6, 2) );
$uid = $u1+($u2*256);
from php_zklib.
hello i can´t see the information of the device, What can i do?
from php_zklib.
@kamshory hello I use your solution but still cannot add more than 256 users to the device, or read the attendances of them. And from user 256 and on the role is set to administrator instead of user.
from php_zklib.
You can try this one
https://github.com/kamshory/ZKLibrary
from php_zklib.
Related Issues (20)
- Get attandance data not working HOT 3
- Not Working with CRON
- how to config timebegin and timeout to get Attendance HOT 2
- Get Attendance Data HOT 6
- connection problem HOT 3
- How to know if a person has just placed his finger and is logged in? HOT 1
- asp.net support HOT 1
- compatibitlity
- zkteco new device HOT 1
- How to sync PC current Date and time to device
- Hello on new develop have realtime attendance?
- font missing
- userid geting 0 HOT 2
- Java (android) ZKLIB
- unpack(): Type H: not enough input, need 1, have 0 HOT 2
- Not connecting inBIO 260 HOT 1
- Code 2005 ....
- Obtener datos
- Database issue
- ZK MB360
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php_zklib.