Code Monkey home page Code Monkey logo

Comments (11)

send2dawood avatar send2dawood commented on August 17, 2024 3

from tad-php.

haseebhk22 avatar haseebhk22 commented on August 17, 2024

can any one help me please

from tad-php.

send2dawood avatar send2dawood commented on August 17, 2024

from tad-php.

haseebhk22 avatar haseebhk22 commented on August 17, 2024

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

from tad-php.

haseebhk22 avatar haseebhk22 commented on August 17, 2024

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

from tad-php.

send2dawood avatar send2dawood commented on August 17, 2024

from tad-php.

haseebhk22 avatar haseebhk22 commented on August 17, 2024

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

from tad-php.

zkenstein avatar zkenstein commented on August 17, 2024

Run this on tad folder php composer.phar dump-autoload to create autoload file

from tad-php.

haseebhk22 avatar haseebhk22 commented on August 17, 2024

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 :
Here is my code :
`<?php

require 'vendor/autoload.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';

use TADPHP\TADFactory;
use TADPHP\TAD;

try {
$tad = (new TADFactory(['ip' =>
'MY.IP.ADDRESS','com_key'=>0]))->get_instance();
if($tad->is_alive())
{
echo "done";exit();
//$tad->disable();
$att_logs = $tad->get_att_log();
print_r($att_logs);exit();
$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
{
echo "not";exit();
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');
}

?>`

from tad-php.

haseebhk22 avatar haseebhk22 commented on August 17, 2024

@zkenstein
Sir my attendance machine is running and the Zk software is successfully connected to the machine and I can get all the attendance but when i use TAD class there is always connection problem . Can you help me what is the reason ??

from tad-php.

haseebhk22 avatar haseebhk22 commented on August 17, 2024

@zkenstein
When i run your code i got this error :
Fatal error: Call to undefined function my_log() in C:\wamp64\www\tad_php\index.php on line 62

from tad-php.

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.