Skip to content

Instantly share code, notes, and snippets.

@multitel
Last active November 7, 2015 15:52
Show Gist options
  • Save multitel/9338135 to your computer and use it in GitHub Desktop.
Save multitel/9338135 to your computer and use it in GitHub Desktop.
JSON GetCountries
<?php
$api_url = "http://api.multitel.net/json/getcountries";
$username = "username";
$password = "password";
$data = array(
'UserName' => $username,
'Password' => $password
);
$handle = curl_init($api_url);
curl_setopt($handle, CURLOPT_POST, true);
curl_setopt($handle, CURLOPT_POSTFIELDS, $data);
curl_exec($handle);
?>
{"DATA":
[
{
"COUNTRYCODE":"1",
"DESCRIPTION":"USA",
"COUNTRYID":"211",
"ISOCODE":"USA",
"A2B":"225",
"LATITUDE":"38.889747",
"LONGITUDE":"-77.025599"
},{
......
}
], "return_code": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment