PHP

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:

<?
$username="abc";
$password = "123";
$type ="text";
$sender="senderName";
$mobile="1234567890";
$message = urlencode("This is an example message");
$baseurl ="http://demo.shreeweb.com/sendsms.php;"
$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";}
else{
echo "send message failed";}
exit();
?>

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