Content type - please help

Content type - please help SearchSearch
Author Message
Anonymous
Posted on Tuesday, April 29, 2003 - 05:36 pm:   

I could not find a simple sample code of how I should code HTML page to properly send SMS (I get this error in SMSOUT log file: Command not completed. Request returned invalid content type: text/html)

Basically I want to use 2-Way SMS, where I send SMS from phone_1, nowsms will redirect the user to an http page (with the help of phone_2 acting as modem), and nowsms will send back content of that page to the phone_1.

I tried sending http request to a simple html page:
less sign META HTTP-EQUIV="Content-Type" CONTENT="text/html">
this is a test

to a php page with syntax
less sign ?php header ('Content-Type:text/html');?>
this is a test

or even a simpler php page
Content-Type: text/html
this is a test

but nothing. Please note that I used less sign as an indicator.

I keep getting the error "Command not completed. Request returned invalid content type: text/html" in the log file and also I receive it in phone_1.

Thanks in advance for directing me in the right direction (an html code example [for php or for asp] would be much appreciated).

Pete
Bryce Norwood - NowSMS Support (Bryce)
Posted on Tuesday, April 29, 2003 - 05:49 pm:   

Pete,

Change the content type to "text/plain" ... not "text/html".

That sounds like what the problem is ... if a direct response is returned via HTTP, NowSMS wants to see "text/plain" as the content type.

You might also want to take a look at this link:

2-Way SMS Returning a Non-Text Response

It talks about how you can use an HTTP redirect response back to the gateway from a 2-way HTTP command to make the gateway send out a message.

-bn
Anonymous
Posted on Tuesday, April 29, 2003 - 06:24 pm:   

Thank you Bryce. Not only nowsms is a great software, support is outstanding. Keep up the good work!

Pete

P.S. I read instructions over and over and somehow I never bothered to look closer at the content type. Everywhere it says text/plain but I was reading text/html (can you tell I am a web developer?)