in reply to Running an application on a user's computer from a CGI script.

You are best off providing the user with installable software that you can then access on their machine. For example, provide an installer that will register a new browser protocol (call it bf2:), and associate it with a client-side command. Then offer links in the form <a href='bf2://servername.com:port'>Server Name</a>. Windows will then call your handler and pass it the URL, which the local app parses and passes on to Battlefield 2.

That's a bit of work, so there is another approach. Ask the user to download an application that can parse a one-line file containing the information needed to join a server, and uses that to launch the game and connect to that game server. Send such a file with a mime type like application/x-battlefield2-connect-script, and either (a) have your apps installer pre-register as the handler for that type, or (b) instruct the user that they will have to select your app as the default action for that MIME type (only the first time).

<-radiant.matrix->
Larry Wall is Yoda: there is no try{} (ok, except in Perl6; way to ruin a joke, Larry! ;P)
The Code that can be seen is not the true Code
"In any sufficiently large group of people, most are idiots" - Kaa's Law
  • Comment on Re: Running an application on a user's computer from a CGI script.
  • Download Code