Тема: Remote API
Dear Developers,
We want to experiment with the remote API, but we receive an error 4 from the server if we try to login. This means 'Wrong parameters', but we are using the parameters from the api.
Does anyone had some experience with the beta remote api?
This is our php-file:
<?
$url = 'http://testing.wialon.com/wialon/ajax.html?svc=core/login';
$fields = array(
"user"=>"apitest",
"password"=>"apitest"
);
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
$fields_string = rtrim($fields_string,'&');
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
Regards,
Jan