".$label.""; echo "
";
	echo htmlspecialchars(var_export($obj,1));
	echo "
"; } if ($_POST['psw'] != '') { $username = $_POST['username']; $psw = $_POST['psw']; $host = "https://api.itrack.hu/wsif/services/DefaultWebService?wsdl"; try { //try to connect $client = new SoapClient($host, array("exceptions" => 1)); //getting the list of available functions $farray = $client->__getFunctions(); my_print("Available functions in DefaultWebService",$farray); //try to login; $result = $client->login(array('login' => $username,'password' => $psw)); $sessionid = $result->return; //getting the list of vehicles $result = $client->getTargets(array('session_id' => $sessionid)); my_print("Vehicles",$result->return); //getting the last positions of vehicles $xml = simplexml_load_string($result->return); $targets = array(); foreach($xml->target as $target) { foreach($target->attributes() as $name => $value) { if($name=='id') { array_push($targets , $value); } } } $result = $client->getLastCoordinates(array('session_id' => $sessionid, 'targets' => $targets)); my_print("Last positions",$result->return); } catch (SoapFault $E) { echo $E->faultstring; } } else { ?>

iTrack webservice test

username psw