A browser connects to a port (usually 80). If that executable is listening on one, you can use it. It's technically not impossible for an executable being both daemon and plain shell app, depending on the call, but I doubt you have that. Ofcourse there is also the matter of completly handling HTTP headers, since the webserver normally does... You'll always need a webserver to connect to, even if your script is the webserver itself.
Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur. | [reply] |
You can certainly take a Perl script, and turn it into an .exe file. I just ran a simple test using PerlApp to create a standalone executable out of a very simple Perl script. The fact that your browser is being passed an entire file for download means that your web server did not see the target file (YourScript.exe) as a file to be parsed/executed. You must make sure that your web server has been setup correctly (as Zaxo points out).
If you really would like to completely offload the work to a client's machine, then I would suggest installing your .exe as a listening service on the end users machine. This would not be a full fledged web server, but rather a simple program that only listens for specific data on a specific port (like the idea that Beatnik was suggesting). You could then redirect your HTML FORM tag to post to the localhost on your listening port.
Of course this whole scheme will require you to get the end user to install the listening service.
If you do not desire to have the end user install programs locally (issues with different operating systems, and end user know how), then you will probably have to use a language/facility that is supported in the browser. Such as stand alone applets, ActiveX applications, and perhaps even simple Javascript and or VBScript.
Chris
'You can't get there from here.' | [reply] |