Questions about 2way and more

Questions about 2way and more SearchSearch
Author Message
Jorge Go
New member
Username: Ace888net

Post Number: 5
Registered: 11-2006
Posted on Wednesday, November 15, 2006 - 04:17 pm:   

hello bn, thanks for the quick response!

unfortunately, I still have some questions that may need you assistance once again:

1.) I have tried running my php script using [c:\php\php.exe test.php], inside is just plain exec("C:\Program Files\Winamp\winamp.exe"),and alos writting [c:\windows\systme32\cmd.exe /c "C:\Program Files\Winamp\winamp.exe"], unfortunately both of these failed to run winamp... Am I doing something wrong here, please advice..

2.) I have also tried to run the 2way-redirect.php, i used [c:\php\php.exe 2way-redirect.php sender=@@SENDER@@&text=@@FULLSMS@@] but it didn't do anything..

3.) may I know what the text/plain does, or what is its' function? Is it correct that if the header was to be changed to "Location: http://google.com" Nowsms would go to google?

4.) Is it possible to disable thefeature which continues to url, because I tried running for the run command form the star menu using the http:server:port\... to send a message, and it worked, but for example if I where to send many messages it would then flood my screen with explorers.

5.) Lastly, may I know if it is possible to disable the feature where nowsms validates the user's number first before answering with sms, something like ???? or *

Sorry for the questions, I hope you could enlighten me on these matters, thank again and more power!
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6845
Registered: 10-2002
Posted on Wednesday, November 15, 2006 - 09:32 pm:   

1.) YOU ARE TRYING TO HAVE A 2-WAY COMMAND LAUNCH WINAMP?!?!?!? AND DOING THIS FROM WITHIN A PHP SCRIPT?

Yes, I'm shouting by typing in all capitals. I don't mean any offense, but this is the most insane support query related to NowSMS that I have encountered today.

Maybe this brief explanation will help clear some of your confusion ...

Programs that are spawned by 2-way commands are run in the background of the PC as a non-interactive service process. If you are expecting a 2-way command to display something on the screen, it will not. Programs that are spawned by a 2-way command should be designed to run quickly, performing their intended task and then terminating.

2.) I would not expect it to do anything. An HTTP redirect response can only be returned in an HTTP response by HTTP based 2-way commands.

3.) When you make an HTTP request, an HTTP server (or script running on an HTTP server) is expected to return a response. This response has a content type associated with it. The normal content type is "text/html" for an HTML page. It could be "image/gif" for a GIF image. "text/plain" indicates that it is plain text ... we require that HTTP-based 2-way commands that want to return a text response return this content type to signal that the developer knows what they are doing and intended to return a text response.

Note: If you are launching PHP scripts locally, it's probably not going to work they way that you want it to. While it is possible to run PHP scripts from a command line, PHP wasn't really designed to work that way, it was designed to return HTTP responses when run under the control of an HTTP web server.

The Google part of your question makes no sense to me.

4.) Doctor, it hurts when I do this.

Then stop doing it.

When you do this, you are telling Internet Explorer to load the page associated with that URL. Internet Explorer expects there to be a response, otherwise it would still open a window, but display an error instead.

Maybe this will help you: http://support.nowsms.com/discus/messages/1/5318.html

5.) I'm not aware of the feature that you are trying to disable.