Home Integration Online SMS Pricing Login /Sign up My Account Contact Us  
 
PHP Scripts [HTTP API]

 

Use the PHP script below to send SMS. You can modify this basic script to your requirements.    


<?php

$user = "94123456789";
$password = "0000";
$text = urlencode("This is an example message");
$to = "94000000000";


$baseurl ="http://www.textit.biz/sendmsg";
$url = "$baseurl/?id=$user&pw=$password&to=$to&text=$text";
$ret = file($url);


$res= explode(":",$ret[0]);

if (trim($res[0])=="OK")
{
echo "Message Sent - ID : ".$res[1];
}
else
{
echo "Sent Failed - Error : ".$res[1];
}


?>
 

  Resources

Php Integration script

C# Integration script

JAVA Integration script

cURL Integration script

 

 

Downloads

HTTP API Technical Manual (PDF Format)

 

Tip :  If  you get blank response from the api, it may be possible that your hosting provider is blocking external file access.

In such events you should use cURL  Script