PHP code example of ddreher / db-api-client
1. Go to this page and download the library: Download ddreher/db-api-client 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/ */
ddreher / db-api-client example snippets
$client = new DBClient([
'authKey' => 'PutYourAPIKeyHere',
]);
$client->request(...);
$client = new DBClient([
'authKey' => 'PutYourAPIKeyHere',
]);
foreach($client->request(StationBoard::create('008000105', new \DateTime(), StationBoard::DEPARTURE)) as $trainBoard)
{
var_dump($trainBoard);
}
bash
curl -sS https://getcomposer.org/installer | php