Servicio JSON GetDIDs

Esta función proporcionará una lista con formato JSON de los números disponibles para la compra

Meta:

GetDids(Username, Password, Country Code)

Tenga en cuenta que el código de país es en realidad un prefijo completo. Por ejemplo, para los números de llamada gratuita de EE. UU., el código de país sería 1800/1855/1866/1877 o 1888

Ejemplo de uso:

POST:

curl -X POST https://api.multitel.net/json/getdids \
--data-urlencode "UserName=USERNAME" \
--data-urlencode "Password=PASSWORD" \
--data-urlencode "CountryCode=1203"

GET:

curl -x GET https://api.multitel.net/json/getdids/USERNAME/PASSWORD/1203

También puede utilizar el siguiente ejemplo:

<?php

  $server_url = 'https://api.multitel.net/json/getdids/';
  // GET : https://api.multitel.net/json/getdids/username/password/prefix

  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" value="administrator" />
    <br />
    Password : <input type="text" name="password" value="password" />
    <br />
    Country Code : <input type="text" name="country_code" value="" />
    <br />
    <input type="submit" name="submit" value="submit" />
  </form>
</body>
</html>

Ejemplo de código · Ver código fuente

El resultado será:

{"DATA":
  [
    {
      "Number":"12036587208",
      "SetupCost":"2.000",
      "MonthlyCharges":"3.00",
      "PerMinuteCharges":"0.019",
      "Country":"United States",
      "Area":"",
      "CountryCode":"US",
      "StateCode":"1203",
      "FreeMinutes":0,
      "VOIP":1,
      "SMS":1,
      "MMS":0,
      "PER_SMS":"0",
      "PER_MMS":"0",
      "SS7":3214
    },{
      "Number":"12036587209",
      "SetupCost":"2.000",
      "MonthlyCharges":"3.00",
      "PerMinuteCharges":"0.019",
      "Country":"United States",
      "Area":"",
      "CountryCode":"US",
      "StateCode":"1203",
      "FreeMinutes":0,
      "VOIP":1,
      "SMS":1,
      "MMS":0,
      "PER_SMS":"0",
      "PER_MMS":"0",
      "SS7":3714
      },{
      ...
      }
    ],"return_code":0}

Ejemplo de código · Ver código fuente

Buscar documentación