SMS Scripts - PHP

Shreeweb provides you with some ready-made scripts that are available to help you connect to our gateway through your chosen programming language. These scripts all work with the HTTP API. Click here ot Contact Us and try our service.

Send SMS with PHP:

Use the PHP code below to send SMS via the Shreeweb SMS Gateway. Simply Contact Us for an HTTP API account, and you will receive an test account with free credits to try our service.

Code Sample:

$password = "123";
$type ="text";
$message = urlencode("This is an example message");
$baseurl =";"
$url =$baseurl."?username=".$username."&password=".$password."&type=".$type."&sender=".$sender."&mobile=".$mobile."&message=".$message ;
// do send message call
$return = file($url);
list($send,$msgcode) = split('[|]',$return);
if ($send=="SUBMIT_SUCCESS"){
echo "Message sent successfully";}
echo "send message failed";}

Last Updated on Thursday, 10 October 2013 01:28
Copyright © 2022 Shreeweb | All Rights Reserved.