Change redirect for SubmitOK.HTM page

Change redirect for SubmitOK.HTM page SearchSearch
Author Message
rocky
Posted on Sunday, June 01, 2003 - 11:13 am:   

How can I set the page "SubmitOK.HTM" in "SubmitOK.php" ? Now if I click on SUBMIT in "Send Text Message.htm" it's direct on "SubmitOK.HTM", but I would like direct in "SubmitOK.php", please, can explain me how can I do ?
Bryce Norwood - NowSMS Support
Posted on Sunday, June 01, 2003 - 06:22 pm:   

Rocky,

Two things you can do ...

1.) In the URL request that submits the message, include "&ContinueURL=server/path/submitok.php". (Or if you are using a form, add a hidden variable to the form that contains an appropriate value for ContinueURL.) With this variable passed to the server, the "Continue" link in SubmitOK.htm will point to this URL instead of "back".

2.) If you would like to have SubmitOK.htm redirect to another page, then simply modify SubmitOK.HTM in the HTML subdirectory of the gateway.

Within the HEAD section of that file, include something like this:

<META HTTP-EQUIV=REFRESH CONTENT="0;URL=@@ContinueURL@@">

Or ... if you do not want to use "ContinueURL" and always redirect to a particular page, then hard code that page into the META tag.

-bn
claudio81
Posted on Monday, June 02, 2003 - 08:09 am:   

And if i don't want to use the SubmitOK.HTM page?
I want that the page after i have submitted tha page is another one , and i don't want use the refresh meta tag. how can i do? Is possible to modify the gateway for this?
Bryce Norwood - NowSMS Support
Posted on Monday, June 02, 2003 - 02:29 pm:   

Claudio,

Then you would have to submit the message to NowSMS without having the user interact directly with any NowSMS form.

Your PHP script would make its own HTTP connection to the NowSMS server to submit a message, and the user would never connect directly to the NowSMS server.

There's no way to escape at least a redirect on the other approach. The reason for this is because the "SubmitOK.htm" response is being generated by the NowSMS server in response to a message submission. The web server built into NowSMS does not support PHP or ASP. So in order to return a response that used PHP or ASP it would have to be a redirect response.

-bn
claudio81
Posted on Tuesday, June 03, 2003 - 10:00 pm:   

Can you sho me an example of http request to gateway?
Bryce Norwood - NowSMS Support
Posted on Wednesday, June 04, 2003 - 03:07 pm:   

Claudio,

I'm not an expert in PHP.

But there is another posting on this discussion board with a short example of how to make a request of the gateway via PHP.

Here's the URL:

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

This example shows an HTTP POST. There might be an easier way to do an HTTP GET in PHP, but this will work.

-bn