raihanafroz / zkteco

ZKTeco Laravel Library
151 stars 57 forks source link

can't connect after hosting #18

Open Duddy-Satrianugraha opened 1 year ago

Duddy-Satrianugraha commented 1 year ago

I can't connect to my finger print machine after upload to hosting, but the script works perfect on local. i tried different hosting and gives the same result

JoharAlam commented 1 year ago

@Duddy-Satrianugraha How you run your device locally with laravel app. Let me know?

Duddy-Satrianugraha commented 1 year ago

@Duddy-Satrianugraha How you run your device locally with laravel app. Let me know?

Well, each fingerprint device have different port, with a public ip, and when i use laravel localy, the script worked and the app can retrive data. But when i upoad it to a hosting server, it just stop

JoharAlam commented 1 year ago

@Duddy-Satrianugraha Can you share the code sample which you used for local integration if possible?

Duddy-Satrianugraha commented 1 year ago

I use the exampel code on read me section

Duddy-Satrianugraha commented 1 year ago

@JoharAlam i use:

$ip = "xxx.xxx.xxx.xxx:8010"
$zk = new ZKTeco($ip);
if($zk->connect() ){
  $data = $zk->getAttendance(); 
$zk->disconnect();   
} 

then

var_dump($data);
die();

the ip is mypublic static ip and the machine were forwarded to the port 8010

Sochika commented 1 year ago

I have the same issue, has any resolve it?

3li7alaki commented 1 year ago

I'am having the same issue, I cant even connect locally, But were aiming to connect from a webserver to the public IP, I have forwarded the ports to the devices. But cant seem to reach them.

israrAhmed36 commented 11 months ago

I am also facing same issue working fine on local but not working on server . any solution ???

erdum commented 5 months ago

Please everyone, try to understand carefully it's a networking problem. And every developer should aware of this.

https://github.com/raihanafroz/zkteco/issues/35#issuecomment-1990949004 #35