PHP code example of fasttrack / fasttrack-client

1. Go to this page and download the library: Download fasttrack/fasttrack-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/ */

    

fasttrack / fasttrack-client example snippets



Fasttrack\Fasttrack;

$client = new \Fasttrack\Fasttrack('your_token');

try {
  $company = $client->getCompany('example.com');
  print_r($company);
} catch (Exception $err) {
  print_r($err);
}



Fasttrack\Fasttrack;

$client = new \Fasttrack\Fasttrack('your_token');

try {
  $company = $client->getContact('[email protected]');
  print_r($company);
} catch (Exception $err) {
  print_r($err);
}



Fasttrack\Fasttrack;
use Fasttrack\Exceptions;

$client = new \Fasttrack\Fasttrack('your_token');

try {
  $company = $client->getContact('[email protected]');
  print_r($company);
} catch (\Fasttrack\Exceptions\UnauthorizedException $e) {
  print_r('UnauthorizedException');
}