473,503 Members | 5,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

May 11 '06 #1
7 9907
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).
SSI? SSL? I can only guess, but I assume that the document URL must be
accessed with HTTPS and the script must be accessed with HTTP.

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 you really want the script *always* to be executed, the only option is
that the script *is* the document. Use mod_rewrite or similar techniques,
so the script is called when the document URL is requested, let the script
perform whichever task it should do and let it finally return the document
(including correct HTTP headers). But this does not fit with your first
requirement above (if my guess was right).

If it is sufficient that the script is only executed in many cases, when
(probably) a human with a graphical UA requests the document, 'embed' the
script as a IMG element and make it return e.g. a 1x1 transparent GIF.
(This is a so-called 'web bug' and some people don't like these and use
filters to get rid of 'em).
Just use a absolute URL http://.../cgi-bin/script.pl and it's requested with
HTTP, even if the document URL is https://...

If necessary the perl script could return a value (e.g. a picture resp.
text string) to the calling page.

Wladimir


--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
May 11 '06 #2
Wladimir Borsov said the following on 5/11/2006 4:36 AM:
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 ?


<img src="pathToThePerlScript">

At it's simplest.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 11 '06 #3
Randy Webb wrote:
I only want to call this script automatically when someone load the
web page.

How can I do this ?


<img src="pathToThePerlScript">

At it's simplest.


It's simpler than possibility: it isn't even valid markup. As soon as
you consider writing an alt attribute, you will (hopefully) stop and
think what should and could be done when the user agent does not
automatically load an image. Note that the user agent might decide not
to load the image even if it is a common visual browser with automatic
image loading disabled, since it notices that the image is already in
its cache (and it might also get it from a proxy cache).

Thus, this rolls back to the question what the original problem is.
Automatic execution of a server-side script sounds like one possible
approach to solving some problem - which?

It is surely much more robust to arrange things so that the page's
address refers to a server-side script. This script can then do whatever
is necessary before sending the browser some HTML document (perhaps
something that the script just picks up from a file). Even then, caching
may complicate things.
May 11 '06 #4
Wladimir Borsov wrote:
I want to call a perl script myscript.pl in my cgi-bin from a HTML web page.
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 ?

There is the "onload" attribute for <body>. But that is only useful if
the script does no output.
It depends on what the script does.
- Does it modify the HTML in any way?
- Does it output any text?
- Does it only update some information in the background?

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
May 11 '06 #5
Jim Moe wrote:
There is the "onload" attribute for <body>.


It causes a _client-side_ script to be executed, when client-side
scripting is enabled. The question is about server-side scripting.
May 11 '06 #6
Jukka K. Korpela wrote:
There is the "onload" attribute for <body>.


It causes a _client-side_ script to be executed, when client-side
scripting is enabled. The question is about server-side scripting.


Urk.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
May 11 '06 #7
Create an image and set its source to your script.
Or use xmlhttp.

Tim

"Wladimir Borsov" <wl*******@gmx.net> wrote in message news:44**********************@newsread2.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).
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

May 12 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2314
by: Robert Brown | last post by:
Hi All.. What I have is a normal ASP web page wih javascript. The javascript needs to call a payment gateway, but the only way to get to it is https://paymentgateway/external.pl with parameters....
7
4957
by: Danny | last post by:
Newbie here Thanks for the help with this command: print "Status: 204 No Content\n\n"; which returns nothing in a perl script. This is great because I just want my perl script to increment a...
1
1501
by: mattborkin | last post by:
Hey all, For the past 2 years I have been maintaining a webpage for a client. I have created and maintained it using Paraben's Web Page Wizard software. For me, the creation and maintenance...
8
2180
by: jonniethecodeprince | last post by:
Hello all. I need to get a html page to work with a PERL script <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"...
22
5967
by: owlice | last post by:
Greetings! I thought I'd add a little something to a web site, a "tip of the week," and wanted it automated so that if I get hit by a truck (or, more likely, am forgetful), the tip is updated...
5
2279
by: simononestop | last post by:
Hi im totally new to perl this is my first go at using it (I normally use asp). I have set up a form with a cgi script from demon hosting. I have edited the script and the form works it sends me an...
10
6931
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
3
3885
by: happyse27 | last post by:
Hi All, I am creating the perl script using html form(with embedded javascript inside). When using this html form with javascript alone, it works where the form validation will pop up...
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4992
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.