olegkhuss/verilocationsoap

verilocation服务的PHP SOAP客户端/包装器

0.1.0 2014-11-19 10:37 UTC

This package is auto-updated.

Last update: 2024-09-23 01:01:50 UTC


README

示例用法

在composer.json中包含

{
    .....
	"require": {
		"olegkhuss/verilocationsoap": "~0.1.0@dev"
	}
}

PHP代码

<?php

use Gelo\Verilocation\SoapClient as VerilocationClient;

$client = new VerilocationClient('http://www.verilocation.com/gps/xml/version_001.asmx?wsdl', array(
	// options
    // 'cache_wsdl' => WSDL_CACHE_MEMORY,
));
try {
    $client->doLogon('<username>', '<password>');

    // is webservice active?
    print_r($client->isWebserviceActive());
    // get all vehicles
    print_r($client->getVehicles());
    // get all vehicles extended
    print_r($client->getVehiclesExt());
    // get all vehicles extended
    print_r($client->getLocationsLatest());

} catch (\Exception $e) {
    // could not login, chekc username/password
    throw $e;
}