Guest User

Untitled

a guest
Nov 8th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. $username = 'wsdatumpos';
  2. $password = 'w$D4tuM#p0$';
  3. $placa = 'todos';
  4.  
  5. $soapURL = "http://190.143.101.58:2998/VideoData.asmx?WSDL";
  6.  
  7. $client = new SoapClient($soapURL,array());
  8.  
  9.  
  10.  
  11.  
  12. $auth = array(
  13. 'sUser' => $username,
  14. 'sPassw' => $password,
  15. 'sPlate' => $placa,
  16. 'GetLastPosition'=> array(
  17. 'Fecha/Hora Evento' => '',
  18. 'Velocidad' => '',
  19. 'Latitud' => '',
  20. 'Longitud' => '',
  21. 'Sentido' => '',
  22. 'Curso' => '',
  23. 'Informacion de la ubicacion' =>'',
  24. 'Evento' => '',
  25. 'Zona' => '',
  26. )
  27.  
  28. );
  29.  
  30.  
  31.  
  32. /*Header authentication*/
  33. $header = new SoapHeader('http://190.143.101.58:2998/','GetLastPositionResult',$auth,false);
  34. $client->__setSoapHeaders($header);
  35.  
  36.  
  37. /* Executing a fuction, for example isAlive method */
  38. $result = $client->GetLastPosition($auth)->GetLastPositionResult;
  39. print_r( $result);
Add Comment
Please, Sign In to add comment