Knowledgebase: Programming / API
Using PHP to Access Data from the ACTAtek
Posted by Dan F (Import) on 16 January 2007 11:52 PM

Disclaimer:

Intelligent Biometric Controls, Inc. makes no guarantees for the accuracy of the information contained in this article. The code contained in this article was supplied by a third party user of the ACTAtek system and has not been tested by members of Intelligent Biometric Controls, Inc.'s Technical Support department.


Purpose:

The following code demonstrates the uses of PHP for accessing the Web Services of an ACTAtek unit. This particular code downloads and displays the users list.


Code:

#!/usr/bin/php
<?php
    ini_set("soap.wsdl_cache_enabled", "0");
    $client = new SoapClient(NULL,
    array(
        "location" => "http://192.168.1.100/cgi-bin/rpcrouter",
        "uri" => "http://www.hectrix.com/ACTAtek.xsd",
        "style" => SOAP_RPC,
        "use" => SOAP_LITERAL,'trace' => 1, 'exceptions' => 1));
    try {
        $id = $client->__call("login",
        array(new SoapParam('A999', 'username'),
        new SoapParam('1','password')));
        echo $id;
        $result = $client->__call('getUsers',
        array(new SoapParam($id,'sessionID'),
        new SoapParam(null, 'getUsersCriteria') ));
        var_dump($result);
    } catch (Exception $e){
        print $e->getMessage();
        print "Error";
        echo "REQUEST:<pre>\n" . $client->__getLastRequest() ."\n</pre>";
        throw $e;
    }
?>



(1022 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).