-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
connection problem #70
Comments
can any one help me please |
I have wirking code i will share it with you
…On Thu, 31 Jan 2019, 1:31 pm haseebhk22 ***@***.*** wrote:
can any one help me please
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#70 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA5w57LZjdYHEUhXpkyf-lMt7cAhZYBiks5vIqnNgaJpZM4abzx1>
.
|
yes please i will be thankful if you share your working code |
require 'vendor/autoload.php';
require 'tad/lib/TADFactory.php';
require 'tad/lib/TAD.php';
require 'tad/lib/TADResponse.php';
require 'tad/lib/TADPHP/Providers/TADSoap.php';
require 'tad/lib/TADPHP/Providers/TADZKLib.php';
require 'tad/lib/TADPHP/Exceptions/ConnectionError.php';
require 'tad/lib/TADPHP/Exceptions/FilterArgumentError.php';
require 'tad/lib/TADPHP/Exceptions/UnrecognizedArgument.php';
require 'tad/lib/TADPHP/Exceptions/UnrecognizedCommand.php';
use TADPHP\TADFactory;
use TADPHP\TAD;
try {
$tad = (new TADFactory(['ip' =>
'182.180.150.260','com_key'=>0]))->get_instance();
if($tad->is_alive())
{
//$tad->disable();
$att_logs = $tad->get_att_log();
$att_logs=$att_logs->filter_by_date(['start' => date('Y-m-d'),'end' =>
date('Y-m-d')]);
if ($att_logs->is_empty_response())
{
my_log('Does not have logs recorded');
//continue;
}
else
{
$array_att_logs = $att_logs->to_array();
$device_logs = array();
$counter=1;
if(!empty($array_att_logs))
foreach($array_att_logs as $key =>$val )
{
foreach($val as $log)
{
$device_logs[]= array(
'institutes_inst_id' => $row['inst_id'],
'employees_machine_user_id' => $log['PIN'],
'date' => date('Y-m-d',strtotime($log['DateTime'])),
'time' => date('H:i:s',strtotime($log['DateTime']))
);
$counter++;
}
}
add_att_logs($device_logs);
//$tad->enable();
my_log('Device in ' . $row['inst_name']. '['.$row['ip_address']. '] has ' .
$counter . ' records');
}
}
else
{
my_log('Device in ' . $row['inst_name'] . ' is off-line');
continue;
}
}
catch(Exception $e)
{
my_log('Device in ' . $row['inst_name']. '['.$row['ip_address']. '] is
offline');
}
…On Thu, Feb 7, 2019 at 3:07 PM Haseeb khan ***@***.***> wrote:
I have wirking code i will share it with you
… <#m_-7494239903006511939_>
On Thu, 31 Jan 2019, 1:31 pm haseebhk22 ***@***.*** wrote: can any one
help me please — You are receiving this because you are subscribed to this
thread. Reply to this email directly, view it on GitHub <#70 (comment)
<#70 (comment)>>,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA5w57LZjdYHEUhXpkyf-lMt7cAhZYBiks5vIqnNgaJpZM4abzx1
.
yes please i will be thankful if you share your working code
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#70 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA5w5zt_dSgUfEiv1Mh-FpaYJpla4HB0ks5vK_rWgaJpZM4abzx1>
.
|
Thanks for sharing code but where is vedor/autoload.php this file is not exist |
you have to download it from github
On Mon, Feb 11, 2019 at 11:33 AM Haseeb khan <[email protected]>
wrote:
… require 'vendor/autoload.php'; require 'tad/lib/TADFactory.php'; require
'tad/lib/TAD.php'; require 'tad/lib/TADResponse.php'; require
'tad/lib/TADPHP/Providers/TADSoap.php'; require
'tad/lib/TADPHP/Providers/TADZKLib.php'; require
'tad/lib/TADPHP/Exceptions/ConnectionError.php'; require
'tad/lib/TADPHP/Exceptions/FilterArgumentError.php'; require
'tad/lib/TADPHP/Exceptions/UnrecognizedArgument.php'; require
'tad/lib/TADPHP/Exceptions/UnrecognizedCommand.php'; use TADPHP\TADFactory;
use TADPHP\TAD; try { $tad = (new TADFactory(['ip' =>
'182.180.150.260','com_key'=>0]))->get_instance(); if($tad->is_alive()) {
//$tad->disable(); $att_logs = $tad->get_att_log();
$att_logs=$att_logs->filter_by_date(['start' => date('Y-m-d'),'end' =>
date('Y-m-d')]); if ($att_logs->is_empty_response()) { my_log('Does not
have logs recorded'); //continue; } else { $array_att_logs =
$att_logs->to_array(); $device_logs = array(); $counter=1;
if(!empty($array_att_logs)) foreach($array_att_logs as $key =>$val ) {
foreach($val as $log) { $device_logs[]= array( 'institutes_inst_id' =>
$row['inst_id'], 'employees_machine_user_id' => $log['PIN'], 'date' =>
date('Y-m-d',strtotime($log['DateTime'])), 'time' =>
date('H:i:s',strtotime($log['DateTime'])) ); $counter++; } }
add_att_logs($device_logs); //$tad->enable(); my_log('Device in ' .
$row['inst_name']. '['.$row['ip_address']. '] has ' . $counter . '
records'); } } else { my_log('Device in ' . $row['inst_name'] . ' is
off-line'); continue; } } catch(Exception $e) { my_log('Device in ' .
$row['inst_name']. '['.$row['ip_address']. '] is offline'); }
… <#m_8444458323558097279_>
On Thu, Feb 7, 2019 at 3:07 PM Haseeb khan ***@***.***> wrote: I have
wirking code i will share it with you … <#m_-7494239903006511939_> On Thu,
31 Jan 2019, 1:31 pm haseebhk22 ***@***.*** wrote: can any one help me
please — You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#70
<#70> (comment) <#70 (comment)
<#70 (comment)>>>,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA5w57LZjdYHEUhXpkyf-lMt7cAhZYBiks5vIqnNgaJpZM4abzx1
. yes please i will be thankful if you share your working code — You are
receiving this because you commented. Reply to this email directly, view it
on GitHub <#70 (comment)
<#70 (comment)>>,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA5w5zt_dSgUfEiv1Mh-FpaYJpla4HB0ks5vK_rWgaJpZM4abzx1
.
Thanks for sharing code but where is vedor/autoload.php this file is not
exist
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#70 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA5w56c8SBq16KrwJfhPd3A8UVEmw1Prks5vMQ7AgaJpZM4abzx1>
.
|
sir i already download from github but in the folder the vendor folder or autoload.php not exist |
Run this on tad folder php composer.phar dump-autoload to create autoload file |
Sir I have done this now in your code that you provide , I change the ip address but result is the same no connection is made : require 'vendor/autoload.php'; use TADPHP\TADFactory; try { ?>` |
@zkenstein |
@zkenstein |
connection problem i have done everything but i got an error
Fatal error: Uncaught exception 'TADPHP\Exceptions\ConnectionError' with message 'Imposible iniciar conexión con dispositivo 192.168.2.200' in C:\wamp64\www\tad\lib\TAD.php on line
Here is my code
`<?php
require 'lib/TADFactory.php';
require 'lib/TAD.php';
require 'lib/TADResponse.php';
require 'lib/Providers/TADSoap.php';
require 'lib/Providers/TADZKLib.php';
require 'lib/Exceptions/ConnectionError.php';
require 'lib/Exceptions/FilterArgumentError.php';
require 'lib/Exceptions/UnrecognizedArgument.php';
require 'lib/Exceptions/UnrecognizedCommand.php';
?>`
The text was updated successfully, but these errors were encountered: