![]() |
How to call a simple perl script from HTML without need of HTTPS but simple HTTP ?
I want to call a perl script myscript.pl in my cgi-bin from a HTML web page.
This call should NOT use SSI (because in this case HTTPS://.... protocol is necessary). Furthermore NO button click should be required (so I am not talking about a perl script in a form). I only want to call this script automatically when someone load the web page. How can I do this ? If necessary the perl script could return a value (e.g. a picture resp. text string) to the calling page. Wladimir |
Re: How to call a simple perl script from HTML without need of HTTPS but simple HTTP ?
Wladimir Borsov wrote:
> I want to call a perl script myscript.pl in my cgi-bin from a HTML web page. > This call should NOT use SSI (because in this case HTTPS://.... protocol is necessary). > Furthermore NO button click should be required (so I am not talking about a perl script in a form). > > I only want to call this script automatically when someone load the web page. > > How can I do this ? > > If necessary the perl script could return a value (e.g. a picture resp. text string) to the calling page. You could use SSI (Server Side Includes) on unixoid systems: <html> <body> <!--#exec cgi="/cgi-bin/script.pl"--> </body> </html> Just don't forget to give your file the .shtml extension in stead of ..htm(l). The output of /cgi-bin/script.pl will be displayed inside the webpage that calls the script. (could be text, image, etc.) Hope this helps, -- Bart |
Re: How to call a simple perl script from HTML without need of HTTPS but simple HTTP ?
Wladimir Borsov wrote:
> I want to call a perl script myscript.pl in my cgi-bin from a HTML web page. > This call should NOT use SSI (because in this case HTTPS://.... protocol is necessary). > Furthermore NO button click should be required (so I am not talking about a perl script in a form). > > I only want to call this script automatically when someone load the web page. > > How can I do this ? > > If necessary the perl script could return a value (e.g. a picture resp. text string) to the calling page. Sorry, I overlooked SSI was not an option for you. (However, why doesn't it work over HTTPS ? If you place yourscript.pl e.g. in the same SSL-enabled directory, that should normally work) I think there is no other way to call CGI from within HTML, at least not a direct one. Maybe <p>Original page</p> <iframe width="0" height="0" src="/cgi-bin/myscript.pl" style="visibility:hidden; display:none; width:0px; height:0px"> </iframe> You could then adjust the iframe's height/width if you know what kind of output you're expecting from myscript.pl. Client side scripting (eg javascript) could be helpful too in this scenario. Hope this helps, -- Bart |
Re: How to call a simple perl script from HTML without need of HTTPS but simple HTTP ?
Wladimir Borsov wrote: > I want to call a perl script myscript.pl in my cgi-bin from a HTML web page. > This call should NOT use SSI (because in this case HTTPS://.... protocol is necessary). > [...] Misconception. Maybe you're confusing SSI (Server Side Inlcudes) with SSL (Secure Socket Layer) ? SSL works over HTTPS, but has nothing to do with SSI. So maybe you can use SSI after all :-) -- Bart |
Re: How to call a simple perl script from HTML without need of HTTPS but simple HTTP ?
"Wladimir Borsov" <wladimirb@gmx.net> wrote in message news:4462f7de$0$11064$9b4e6d93@newsread4.arcor-online.net... > I want to call a perl script myscript.pl in my cgi-bin from a HTML web page. > This call should NOT use SSI (because in this case HTTPS://.... protocol is necessary). https and SSI are not incompatible or mutually exclusive, so I have no idea why you place this restriction on yourself. > Furthermore NO button click should be required (so I am not talking about a perl script in a form). > > I only want to call this script automatically when someone load the web page. Then use Javascript. Of course, none of this has anything to do with Perl. *** Posted via a free Usenet account from http://www.teranews.com *** |
| All times are GMT. The time now is 03:57 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.