Send SMS from PHP Script (Updated)

Posted by on Jan 25, 2011 in Support Blog

Topic Keywords: ,

Quite a few people use the PHP script that Bryce provided 7-1/2 years ago for sending an SMS message through NowSMS from PHP.

Over the years, we’ve added a few comments to clarify how the script is to be used.  However, one of the most limiting things about the script is that it doesn’t support any of the additional SMS URL parameters supported by NowSMS.

Among other uses, these parameters might be needed in order to specify the SMSC Route to be used for sending the message, or specifying a sender address.

An updated SendSMS.php script, which supports additional URL parameters is available at

In the original script, we provided the following example for calling the SendSMS PHP function:

$x   = SendSMS("", 8800, "username", "password", "+44999999999",

 "Test Message");

The new script supports the above format, but can also support additional optional parameters, specified in “parameter=value” format.  For example, the following example specifies an explicit outbound SMSC route to be used.

$x   = SendSMS("", 8800, "username", "password", "+44999999999",

 "Test Message", "SMSCRoute=Test");

The following example specifies an explicit outbound SMSC route and a sender address to be used.

$x   = SendSMS("", 8800, "username", "password", "+44999999999",

 "Test Message", "SMSCRoute=Test", "Sender=1234");

For additional usage information regarding this PHP script, please refer to the original discussion of sendsms.php at

For more information about NowSMS URL parameters, see

The updated SendSMS.php script is available at

For comments and further discussion, please click here to visit the NowSMS Technical Forums (Discussion Board)...

2 Responses to “Send SMS from PHP Script (Updated)”

  1. will trial version allow bulk sms through php script