PHP code example of liridian / pincode-directory
1. Go to this page and download the library: Download liridian/pincode-directory 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/ */
liridian / pincode-directory example snippets
iridian\PincodeDirectory;
$client = new Liridian\PincodeDirectory();
$available_filters = $client->getAvailableFilters();
$available_fields = $client->getAvailableSelectFields();
$locale = $client
->withApiKey($api_key)
->withFilter([['pincode' => '400089']])
->withSort([['pincode' => 'asc'], ['officename' => 'desc']])
->get();
echo '<h1>PincodeDirectory Test</h1>';
echo 'Available filters:';
echo '<pre>'.json_encode($available_filters, JSON_PRETTY_PRINT).'</pre>';
echo 'Available fields:';
echo '<pre>'.json_encode($available_fields, JSON_PRETTY_PRINT).'</pre>';
echo 'Sample response:';
echo '<pre>'.json_encode($locale, JSON_PRETTY_PRINT).'</pre>';