Giter Club home page Giter Club logo

Comments (9)

MostafaNaguib avatar MostafaNaguib commented on July 18, 2024

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.

dnaextrim avatar dnaextrim commented on July 18, 2024

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.

MostafaNaguib avatar MostafaNaguib commented on July 18, 2024

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.

dnaextrim avatar dnaextrim commented on July 18, 2024

Thanks @MostafaNaguib

from php_zklib.

omarouhari avatar omarouhari commented on July 18, 2024

Hello @MostafaNaguib
I use python_zklib and I got several limitations :

  1. The last attendance can't be downloaded.
  2. Can't set cardnumber of a user.
  3. 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.

kamshory avatar kamshory commented on July 18, 2024

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.

dannwolf avatar dannwolf commented on July 18, 2024

hello i can´t see the information of the device, What can i do?

from php_zklib.

ipdigital avatar ipdigital commented on July 18, 2024

@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.

kamshory avatar kamshory commented on July 18, 2024

You can try this one
https://github.com/kamshory/ZKLibrary

from php_zklib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.