1. Go to this page and download the library: Download digitalstars/simple-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/ */
digitalstars / simple-api example snippets
igitalStars\SimpleAPI;
$api = new SimpleAPI();
switch ($api->module) {
case 'auth':
$data = $api->params(['login', 'password']); //если одного из параметров не будет, скрипт завершится с error
$api->answer['auth'] = ($data['login'] == 'admin' && $data['password'] == 'admin');
}