Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   How to call a simple perl script from HTML without need of HTTPS but simple HTTP ? (http://www.velocityreviews.com/forums/t897912-how-to-call-a-simple-perl-script-from-html-without-need-of-https-but-simple-http.html)

Wladimir Borsov 05-11-2006 08:37 AM

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


Bart Van der Donck 05-11-2006 09:12 AM

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


Bart Van der Donck 05-11-2006 09:24 AM

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


Bart Van der Donck 05-11-2006 09:29 AM

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


Tintin 05-11-2006 09:29 AM

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.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57