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
194 stars 176 forks source link

Only connect when access by localhost #57

Open ducduyx87 opened 5 years ago

ducduyx87 commented 5 years ago

Someone have issue only connect when use localhost

kamshory commented 5 years ago

I use this library on my local area network both wired and wireless and it works.

ducduyx87 commented 5 years ago

I try to use Port Forwarding and my problem is done.Now i want to set time to get Attendance, you have solution for this :)) thank for support

wombiro commented 5 years ago

I cant connect the test page just stays blank. When I try to use echo outputs to tell when it stops running, anything after creating the zk object is not executed. kindly help

<?php include "zklibrary.php"; $zk = new ZKLibrary('192.168.1.96', 4370); $zk->connect();

if ($zk->connect()){

echo "success"; }

$zk->disableDevice();

$users = $zk->getUser(); ?>

$user) { $no++; ?>
No UID ID Name Role Password

<?php

$zk->enableDevice();

echo "Device Enabled now";

$zk->disconnect();

?>

Any error in this?

wombiro commented 5 years ago

`<?php include "zklibrary.php"; $zk = new ZKLibrary('192.168.1.96', 4370); $zk->connect();

if ($zk->connect()){

echo "success"; }

$zk->disableDevice();

$users = $zk->getUser(); ?>

$user) { $no++; ?>
No UID ID Name Role Password

<?php

$zk->enableDevice();

echo "Device Enabled now";

$zk->disconnect();

?> `