Contoh Penggunaan API Module di SMS Masking

$auth=MD5($user.$password.$nohp);
$msg=urlencode($msg);

$url="http://send.smsmasking.co.id:8080/web2sms/api/SendSMS.aspx?username=".$user."&mobile=".$nohp."&message=".$msg."&auth=".$auth;
//echo $url;

$curlHandle = curl_init(); // init curl
curl_setopt($curlHandle, CURLOPT_URL, $url); // set the url to fetch
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30); 
curl_setopt($curlHandle, CURLOPT_POST, 0);
$content = curl_exec($curlHandle);

if(!$content)
{
echo 'Curl error: ' . curl_error($curlHandle);
}
else
{
echo $content;
}
curl_close($curlHandle);

?>

 

Script diatas akan mengirimkan sms kepada nomor yang di input kedalam sebuah form.

Tentunya anda dapat mengembangkan sesuai dengan kebutuhan anda maupun perusahaan anda.