1. Go to this page and download the library: Download axm-sysdev/td-client-php 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/ */
axm-sysdev / td-client-php example snippets
XM\TD\Client;
use AXM\TD\Job;
$client = new Client('YOUR-API-KEY-HERE');
$jobId = $client->query('mydatabase', 'hive', 'SELECT * FROM mytable WHERE value >= 500');
while (true) {
$status = $client->jobStatus($jobId);
if (Job::isFinished($status)) {
break;
}
sleep(1);
}
$result = $client->jobResult($jobId);