2-way SMS

2-way SMS SearchSearch
Author Message
Per A
Unregistered guest
Posted on Monday, March 22, 2004 - 07:57 am:   

Hi
Im having trouble getting the 2-waysms working. I can receive and send
messages just fine but when I configure the gateway to automaticly run a
script and send back a message to the sender I get 2 SMS back. One SMS
contains the wanted message and the other SMS contains a message saying:

"Command not completed. Request returned invalid content type: text/html"

My php-script looks like this:

<?php
Header("HTTP/1.1 200 OK");
Header("Content-type:text/plain");
Header("Location:
http://193.11.59.214:8800/?PhoneNumber=0702626771&Text=hello");
?>

The command to execute in NOWSMS:

http://pcn-vcn-16.student.hig.se/Portalen/smsfunkar.php?number=@@Sender@@&sms=@@FullSMS@@

Im setting the content-type to text/plain and I dont see why it shouldent
work. There are also no "spaces" that outputs something after the headers.
Can someone please help me.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2189
Registered: 10-2002
Posted on Monday, March 22, 2004 - 05:39 pm:   

Hi Per,

Because you have the redirect (location header) in there, NowSMS fetches the URL referenced in the redirect.

That URL is a command on the NowSMS server, and the NowSMS response is "text/html" not "text/plain".

Basically, if your script is going to return a redirect response, you should UNcheck the "Command returns response text" setting in the definition of the command.

-bn