1

Php wialon

(21/01/2021 03:39:32 отредактировано gugdwemer)

Тема: Php wialon

How i can get drivers ?


<?php


include('wialon.php');
$wialon_api = new Wialon();

// old username and password login is deprecated, use token login
$token = '$token';
$result = $wialon_api->login($token);
$json = json_decode($result, true);
if(!isset($json['error'])){

    echo "Hello, ".$json['user']['nm']."!<br>";
    $userId = $json['user']['id'];
    echo "<br>$userId<br>";
    echo $wialon_api->core_search_item();
    $wialon_api->logout();
} else {
    echo WialonError::error($json['error']);
}

2

Php wialon

Re: Php wialon

Check on the server file

3

Php wialon

Re: Php wialon

Hi!

I have the next observations

1.- You need get the token for you user or you can use the token in this example https://sdk.wialon.com/playground/demo/login     the token has 72 characters. "5dce19710a5e26ab8b7b8986cb3c49e58C291791B7F0A7AEB8AFBFCEED7DC03BC48FF5F8"

To get your token check this link http://hosting.wialon.com/login.html

2.- The method search_item needs two parameters id and flags, id of the item and flags to get the data that you want. Check this links

https://www.youtube.com/watch?v=XkrS_Zvnw88&t=267s

https://sdk.wialon.com/wiki/en/sidebar/ … earch_item

Regards

4

Php wialon

(16/07/2017 12:02:22 отредактировано spev)

Re: Php wialon

To export report:

  1. Execute report: https://sdk.wialon.com/wiki/en/sidebar/ … xec_report (you should specify report template id or report template that you want to export)
  2. Then export executed report https://sdk.wialon.com/wiki/en/sidebar/ … ort_result You can choose format in format field
Telegram: Обновления Wialon, Wialon updates
Google Chrome Extensions: Wialon Units Map | Gurtam Forum Notifications | Wialon Apps Launcher
Evgenij Spitsyn, Developer, flespi team
5

Php wialon

Re: Php wialon

I am developing an new App where I use Wialon API to log in a Driver with phonenumber and password.

With the Drivers operate request:
https://sdk.wialon.com/wiki/en/kit/remo … er_operate

But how is it possible to login a Driver that is not bind to a unit yet?

6

Php wialon

Re: Php wialon

Hola, soy nuevo en wialon. Estoy intentando obtener datos con wialon en php, pero no puedo. Tengo problemas. ¿Cómo puedo obtener controladores? ¿Quién tiene un ejemplo simple en php? O si alguien me pudiera brindar alguna introduccion de como puedo desarrollar con wialon se los agradeceria Es muy importante, muchas gracias

7

Php wialon

Re: Php wialon

ontrack.systems пишет:

Hola, soy nuevo en wialon. Estoy intentando obtener datos con wialon en php, pero no puedo. Tengo problemas. ¿Cómo puedo obtener controladores? ¿Quién tiene un ejemplo simple en php? O si alguien me pudiera brindar alguna introduccion de como puedo desarrollar con wialon se los agradeceria Es muy importante, muchas gracias

Mira este topicop te dara una idea bien clara de como usar el remote api...

https://forum.gurtam.com/viewtopic.php?id=6768

8

Php wialon

Re: Php wialon

hello got a problem with the wialon core search request with php base on official git wialon class model.

it i always get VALIDATE_PARAMS_ERROR: {id: long, flags: long}

bellow my code

$wialon_api = new Wialons();

        // old username and password login is deprecated, use token login
        $token = '...';
        $result = $wialon_api->login($token);
        $json = json_decode($result, true);
        if(!isset($json['error'])){
           
            echo $wialon_api->core_search_item('{"spec":{"itemsType":"avl_unit","propName":"","propValueMask":"*","sortType":"sys_name","propType":""},"force":1,"flags":4611686018427387903,"from":0,"to":1000}');
            $wialon_api->logout();
        } else {
            echo WialonErrors::error($json['error']);
            return new JsonResponse($json);
        }
9

Php wialon

Re: Php wialon

megb
Looks like you want to send core_search_items request, but in you code I see core_search_item