Created
October 28, 2014 15:05
-
-
Save multitel/625b76ce0265e7adadc9 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/buynumbers'; | |
if(isset($_POST['submit'])){ | |
$data = array( | |
'UserName' => $_POST['username'], | |
'Password' => $_POST['password'], | |
'Number' => $_POST['number'], | |
'URI' => $_POST['uri'], | |
'Type' => $_POST['type'], | |
); | |
$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>BuyNumbers</title> | |
</head> | |
<body> | |
<form name="form1" method="post" action=""> | |
Username : <input type="text" name="username"/> | |
<br /> | |
Password : <input type="text" name="password" value="password" /> | |
<br /> | |
Number : <input type="text" name="number" value="" /> | |
<br /> | |
URI : <input type="text" name="uri" value="" /> | |
<br /> | |
Type : <input type="text" name="type" value="" /> | |
<br /> | |
<input type="submit" name="submit" value="submit" /> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample of successful output:
{"DATA":[{"RETURN":"244225001003"}]}
Sample of unsuccessful output:
{"DATA":[{"RETURN":-165}]}
For list of return codes and more parameters please see this link:
http://www.multitel.net/docs/label/buynumber