PHP code example of ezlocate / ezlocate-php-sdk

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

    

ezlocate / ezlocate-php-sdk example snippets


use \EZLocate\EZLocate;
use \EZLocate\Order;

const EZL_USERNAME = 'YOUR_EZL_USERNAME';
const EZL_ACCESS_TOKEN = 'YOUR_EZL_ACCESS_TOKEN';

$ezl = new EZLocate(EZL_USERNAME, EZL_ACCESS_TOKEN);

$data = [
    'notes' => 'My order notes',
    'ref' => 'XXXX',
    'ref_2' => 'YYYY',
    'person' => [
        'firstname' => 'John',
        'lastname' => 'Doe',
        'ssn' => 'XXXX'
    ]
];

$order = $ezl->createOrder($data);
print_r($order);
term
$ composer