Last active
August 29, 2015 14:08
-
-
Save multitel/7ea2153c1a474b0ad980 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$server_url = 'https://sapi.multitel.net/json/getdids'; | |
if(isset($_POST['submit'])){ | |
$data = array( | |
'UserName' => $_POST['username'], | |
'Password' => $_POST['password'], | |
'CountryCode' => $_POST['country_code'], | |
); | |
$handle = curl_init($server_url); | |
curl_setopt($handle, CURLOPT_POST, true); | |
curl_setopt($handle, CURLOPT_POSTFIELDS, $data); | |
curl_exec($handle); | |
} | |
?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>GetDIDs</title> | |
</head> | |
<body> | |
<form name="form1" method="post" action=""> | |
Username : <input type="text" name="username"/> | |
<br /> | |
Password : <input type="text" name="password"/> | |
<br /> | |
Country Code : <input type="text" name="country_code" /> | |
<br /> | |
<input type="submit" name="submit" value="submit" /> | |
</form> | |
</body> | |
</html> |
Fields returned:
Number -- the phone number
SetupCost -- NRC
MonthlCharges - MRC
PerMinuteCharges - charges applied per minute after free minutes end
Country - Country Name
Area : Area name
Country Code : Country prefix
State Code : Area prefix
FreeMinutes : amount of free minutes (can be 0) . When free minutes are over, PerMinuteCharges apply
VOIP : number allows for VoIP calls
SMS : number supports inbound SMS
MMS : number supports inbound MMS
PER_SMS: price charged per incoming SMS message
PER_MMS: price charged per incoming MMS message
SS7: trunk used for dip (informative only)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample output:
{"DATA":[{"Number":"244225001003","SetupCost":"3.27","MonthlyCharges":"10.26","PerMinuteCharges":"0.0273125","Country":"Angola","Area":"Luanda","CountryCode":"244","StateCode":"2","FreeMinutes":"1000","VOIP":"1","SMS":"0","MMS":"0","PER_SMS":"0","PER_MMS":"0","SS7":"1842"}, ......]}