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

 

   

 

Follow Us


 

Contact Us


Online Inquiry
Email : info@textit.biz
24/7 Hotline  +94 77 282 3050

FAX      +94 71 100 3600

Data Centre Locations


Primary

#62, Pallegunnapane,Polgolle

Backup

#22/411, Regal Range, Homagama