2-way SMS - how to call http://..../test.php?a=anything from php s...

2-way SMS - how to call http://..../test.php?a=anything from php s... SearchSearch
Author Message
Darius
Unregistered guest
Posted on Saturday, September 17, 2005 - 07:59 pm:   

Hello my friends,

NowSMS is an excellent toolbox for 2-way sms developers.
As a newbie to PHP please let me know, how to improve my pph code to work fine.

In my case , the following
"Command returns response text" = NOT checked

is checked.

NowSMS executes http://..../test.php?a=@@SMS@@&b=@@SENDER@@
intended to post a and b ( as globals = on)
to php script
calling
url address, described in
web interface (nowsms manual) for sending
sms.

The problem is I don't know how to call
http://sendsms..../?Number= .....&Text=.....
from within php script.

I did it the following way:

$url ="http:// sendsms url/?Number= ... &Text=..."
than
fopen($url, ...)
or the like.
And it really works fine, sending response sms
to the original sender
but I get the second sms too with
error message.

I think, the above code is not good, but works for running my 2-way sms tests.

No chance to improve it a little to work fine not generating 2 sms responses, 1 ok and 1 with error message ?

Darius
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 4952
Registered: 10-2002
Posted on Monday, September 19, 2005 - 09:14 pm:   

Hi Darius,

I'm sorry, but I don't really understand your question.

If you are receiving an SMS response that says "Command not completed. Request returned invalid content type: xxxxx", then "Command returns response text" IS checked, and it needs to be NOT checked.

Here's my favourite simple PHP example thread:

http://support.nowsms.com/discus/messages/1/3991.html

-bn