PHP code example of pschilly / dcs-server-bot-api

1. Go to this page and download the library: Download pschilly/dcs-server-bot-api 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/ */

    

pschilly / dcs-server-bot-api example snippets


return [

    /*
    |--------------------------------------------------------------------------
    | DCS Bot API URL
    |--------------------------------------------------------------------------
    |
    | This value is the base URL for the DCS Bot API, which will be used when
    | making requests to the API endpoints.
    |
    | See documentation of DCS Server Bot API for more details & configuration on your actual DCS Server Bot.
    |   WebService: https://github.com/Special-K-s-Flightsim-Bots/DCSServerBot/blob/master/services/webservice/README.md
    |   RestAPI: https://github.com/Special-K-s-Flightsim-Bots/DCSServerBot/blob/master/plugins/restapi/README.md
    |
    */

    'base_url' => env('DCS_BOT_API_URL', 'http://localhost:9876'),

];

use Pschilly\DcsServerBotApi\DcsServerBotApi;

$data = DcsServerBotApi::getServerStats();
bash
php artisan dcs-server-bot-api:install
bash
php artisan dcs-server-bot-api:install --url="http://localhost:9867" [--force]
bash
php artisan vendor:publish --tag="dcs-server-bot-api-config"