![]() |
|
Demo token 93a1f6fc-3fa2-40ee-9fae-0ff301df50f0 (The token is valid on average for about three days).
Register and receive a token to access the API. The token will be available in your personal account.
date of update: 2024-12-01 01:01
quantity: 1349
<?php
// Demo token. (Replace it with your token).
$token = '93a1f6fc-3fa2-40ee-9fae-0ff301df50f0';
$url = 'https://wildtracks.pro/api/postalcodes/all/bd/json/'.$token;
// We receive confirmation via the LINK
$jsonData = file_get_contents($url);
// Checking if the data was received successfully
if ($jsonData === false) {
die('Error receiving data from the URL');
}
// Converting JSON to an associative array
$dataArray = json_decode($jsonData, true);
// Checking if it was possible to convert JSON to an array
if ($dataArray === null) {
die('Error decoding JSON');
}
// Output an array
echo "<pre>";
print_r($dataArray);
echo "</pre>";
?>
Description of fields:
country_code | Country code ISO 3166 2 |
postal_code | Postal code |
place_name | Place name |
latitude | Estimated latitude (wgs84) |
longitude | Estimated longitude (wgs84) |
accuracy | Accuracy of lat/lng from 1=estimated, 4=geonameid, 6=centroid of addresses or shape |
admin_name1 | The district |
admin_name2 | City |
admin_name3 | Upazila |