Common
Animals
Fish
Mushrooms
Flora
Login
Registration
Back

MalaysiaMalaysia postal codes

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:21
quantity: 2818

<?php

// Demo token. (Replace it with your token).
$token = '93a1f6fc-3fa2-40ee-9fae-0ff301df50f0';
$url = 'https://wildtracks.pro/api/postalcodes/all/my/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_codeCountry code ISO 3166 2
postal_codePostal code
place_namePlace name
latitudeEstimated latitude (wgs84)
longitudeEstimated longitude (wgs84)
accuracyAccuracy of lat/lng from 1=estimated, 4=geonameid, 6=centroid of addresses or shape
admin_name1The Sultanate