Тема: Get Units Latest Positions From User Using Remote API on PRO (error 4)
this is my code and i'm getting error 4; invalid input. what can i do?
$url = "http://gps.satellite.ge:8026/ajax.html?svc=core/search_item";
$params = array(
"spec" => array(
"itemsType"=>"avl_unit", /* type of object to look for - unit */
"propName"=>"sys_name", /* search by name - "sys_name" */
"propValueMask"=>"*", /* asterisk means to find units with any names */
"sortType"=>"" /* empty value means to sort results by name */
),
"force"=>1, /* cache is not used */
"flags"=>1025, /* object flags to be returned */
"from"=>0, /* starting index for returning result */
"to"=>0 /* return maximum number of objects */
);
$json = json_encode($params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POSTFIELDS,'params='.$json.'&ssid='.$_SESSION['ssid']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
$result = json_encode($result);
curl_close($ch);
i read this post about how to get units latest position. http://forum.gurtam.com/viewtopic.php?pid=35552
Великий и ужасный Гиоргий Каладзе