Perl script's output - send back as SMS | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through January 17, 2005 ⬆ |
◄ ► |
Author | Message | |||
Damir B New member Username: Dodolini Post Number: 1 Registered: 10-2004 |
I'd like to execute a Perl script when an SMS is received (via SMPP connection) and as much I've read so far - there's no problem with that. The output of this perl script should be some text send back as SMS, but this time to some different (third) number. Best ideas/practice how to achieve this? Thank you very much in advance, Damir | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 3608 Registered: 10-2002 |
Hi Damir, You want to use the "redirect" technique. Basically, when you configure the 2-way command, you want to make sure that "command returns response text" is not checked. Then, instead of echoing the text response back, you want to have your script return back with a redirect response. Basically, I'm talking about an HTTP 301 or 302 response with a "Location:" header that contains a URL that is a command for the NowSMS gateway to send a message. This technique is described in the following link: http://www.nowsms.com/support/bulletins/tb-nowsms-003.htm I don't have any examples in Perl, but perhaps a PHP example will help you. The following thread shows two examples of using a 2-way script to return a response in PHP. One example uses the simple text response ... another uses the redirect technique. Using the redirect technique, you can specify a different recipient, or multiple recipients. http://support.nowsms.com/discus/messages/1/3991.html |