PHP code example of track-any-device / jt808

1. Go to this page and download the library: Download track-any-device/jt808 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

track-any-device / jt808 example snippets


'redis' => [
    // ...
    'jt808' => [
        'url'      => env('REDIS_URL'),
        'host'     => env('REDIS_HOST', '127.0.0.1'),
        'password' => env('REDIS_PASSWORD'),
        'port'     => env('REDIS_PORT', '6379'),
        'database' => env('REDIS_JT808_DB', '1'),
    ],
],

return [
    'server_host'      => env('JT808_SERVER_HOST', ''),
    'server_port'      => (int) env('JT808_SERVER_PORT', 7018),
    'redis_connection' => env('JT808_REDIS_CONNECTION', 'jt808'),
];
bash
php artisan vendor:publish --tag=jt808-config
dotenv
JT808_SERVER_HOST=your-tcp-server-host
JT808_SERVER_PORT=7018
JT808_REDIS_CONNECTION=jt808
bash
php artisan db:seed --class=DeviceTypeSeeder
bash
php artisan jt808:consume