I am developing a user interface using cgi script and sh and I am having problem in implementing following functionality:
On clicking a button in browser, an HTTP request should go to a server which
should then return a result to the browser.
Problem is that I am going to run this interface in an embedded environment (having httpd as the webserver) where I don’t have php, perl or java for server side coding.
I know I can use XMLHttpRequest of javascript but I am not sure if sh can be used to handle those requests on server. Is it? Can I use bash/sh instead of php/java/perl on server side (for I don’t have any of these programing languages on my embedded device) ?
or are there any alternatives to XMLHTTPRequest?
XMLHttpRequestwould run on the client’s browser, not on the server.I would indeed suggest writing in C a CGI which, perhaps by using libcurl, would do the HTTP request
You could write your CGI in
sh(but I am not sure it would be a good idea in your case).