Retailer magic: SMS strategies for Winter | On Demand Sign up for our webinar
This API call allows you check if you can send SMS to a specific number, for example an international number.
https://
www.voodoosms.com/vapi/server/checkDest
Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
case "GET":
$uid = htmlspecialchars($_GET["uid"]);
$pass = htmlspecialchars($_GET["pass"]);
$dest = htmlspecialchars($_GET["dest"]);
$format = htmlspecialchars($_GET["format"]);
break;
case "POST":
$uid = htmlspecialchars($_POST["uid"]);
$pass = htmlspecialchars($_POST["pass"]);
$dest = htmlspecialchars($_POST["dest"]);
$format = htmlspecialchars($_POST["format"]);
break;
}
$url = 'https://www.voodoosms.com/vapi/server/checkDest?uid='.$uid.'&pass='.$pass.'&dest='.$dest
."&format=".$format;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
// Download the given URL, and return output
$output = curl_exec($ch);
echo $output." ".curl_error($ch);
// Close the cURL resource, and free system resources
curl_close($ch);
?>
Response
<xml>
<result>200</result>
<resultText>You are permitted to send SMS to this destination number but we can not
confirm it is an active number</resultText>
</xml>