SENDING SMS FROM PHP APP TO MULTIPLE SMPP

SENDING SMS FROM PHP APP TO MULTIPLE SMPP SearchSearch
Author Message
William Maro Venance
New member
Username: Willemaro

Post Number: 1
Registered: 01-2011
Posted on Tuesday, January 25, 2011 - 10:04 am:   

I am using nowSMS trial version, I have to conclude this before I buy
the licence.

I am using GSM modem to receive SMS and forward them to PHP
application( using COMMAND TO EXECUTE) according to keyword (SMS
Command Prefix), and then do some

processing using PHP script which I have written. After that I reply
the using sendSMS ( ) function you provided.

The problem come during the reply. I have two SMPP connections, and I
have to perform selective routing, such that when SMS received has
KEYWORD say CAR the reply should go

through SMPP1 and when SMS received has KEYWORD say HOUSE should be
routed through SMPP2.

In this case I am using NowSMS as a SERVER
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2847
Registered: 08-2008
Posted on Tuesday, January 25, 2011 - 08:34 pm:   

Hi William,

That is a good question.

I asked one of my colleagues who knows a little bit more about PHP if they could modify the SendSMS function in sendsms.php so that it supported additional URL parameters.

An updated script is available here:

http://www.nowsms.com/send-sms-from-php-script-updated

(Or direct link to the updated PHP script here: http://www.nowsms.com/download/sendsms2-php.txt)

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

$x = SendSMS("127.0.0.1", 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 and a sender address to be used.

$x = SendSMS("127.0.0.1", 8800, "username", "password", "+44999999999", "Test Message", "SMSCRoute=Test", "Sender=1234");

Note that the use of any optional parameters is just that ... optional. If you don't need to set SMSCRoute or Sender, then do not include these parameters in the function call.

For more information on how to use the SMSCRoute parameter for routing messages to a particular connection, see http://www.nowsms.com/routing-sms-messages-to-a-specifc-smsc-route

--
Des
NowSMS Support