[Xitami] Unconditional execution of a CGI in html.

rolinger rolinger1 at hotmail.com
Wed Feb 11 20:03:00 CET 2009


I think I get what you are referring to.  You are looking to automatically 
have a link/script called from within an existing web page.  The 'image' 
rendering example you gave below would be one way to do it.  The other way 
is to use javascript to execute during on "onLoad" in the HEAD or in the 
<body> tag itself.  Though the javascript method would most likely require 
sending the cgi script to a target iFrame or something.  I don't think there 
is a way to get javascript to render external CGI within the same page 
itself.

However, if you are calling trying to call CGI within a static page, why not 
just make the whole page dynamic, so that as the page itself is rendered and 
calling the page counters at the same time.

I use image src=/cgi-bin in two locations on my site, they use perls Imager 
to create/edit/output images on the fly so they don't have to be stored on 
the harddrive, but realize that if you are calling an image cgi script on 
the fly that it is being called and rendered while the current page is also 
still being loaded.  But AFTER the page if fully loaded there will be no way 
to automatically call CGI scripts (unless you did a Javascript delayed timer 
type function).

Links from GETs (href) or POSTs (forms) are called upon user interaction of 
some sort.  Image src=/cgi-bin/etc... might be the only way to do 
this...also realize that SSI is executed, just like an image src=/cgi-bin, 
as the page is rendering - an not after it is rendered.

Even after your second explanation I am still not 100% clear on what it is 
you want...but I hope the above helps.

-R

=========
"Socialism is the philosophy of failure, the creed of ignorance,
and the gospel of envy, its inherent virtue is the equal sharing of misery."
     - Sir Winston Churchill -
=========
----- Original Message ----- 
From: <jglong3 at att.net>
To: "Xitami Users General Discussion" <xitami at lists.xitami.org>
Sent: Wednesday, February 11, 2009 10:37 AM
Subject: Re: [Xitami] Unconditional execution of a CGI in html.


> Hello  rolinger and  Hogan Courrier ,,,,,,  :) :)
>
> THANKS for the replies,,,,,        :) :)
>
>
> Hogan,,,,,, :) :)
>
> I'll give that link a try ----THANKS....!!!  :) :) <:)
>
>
>
> rolinger,,,,,, :) :)
>
> For a Web Page that already exists and visited (displayed) by a Browser, 
> it is the HTML code in that Web Page that will force the execution of a 
> CGI without any user action that is required such as the HTML "a href,,,," 
> or "form field". Also, even having to use the HTML "image,,,,," 
> (i.e.)(poking on a link, or entering data to a form field, or the action 
> of an HTML "image,,,,,URL/cgi-bin/program?argument1+Argument2,,,,").
>
> It is similar to the execution of a CGI counter. Most of these counters 
> that I have seen use the HTML "<img src="/cgi-bin/counter?a+b+c+d,,,,">" 
> which creates a graphic file containing the counter value where a,b,c,d,,, 
> control the format of how the counter will display and then outputs that 
> graphic file to the Web Page at the Browser.
>
> In this case it is a simple CGI that records Xitami variables, etc. at the 
> Xitami Server. And, the user of the Browser does not have to poke on any 
> item (link, etc.)in the display of the Web Page for that CGI to execute. 
> And, the HTML does not use any "Image,,,,," to execute the CGI.
>
> If you want I can send you an example of what has been tried. We even 
> tried to see if SSI would work in the HTML of that Web Page such as:
>
>    <!--#exec cgi="/cgi-bin/test?A+B+C"-->
>
>
>
> Thanks for your time, help, and advice!!!!    :) :)
>
> Jerry
>
>
> -------------- Original message from "rolinger" 
> <rolinger1 at hotmail.com>: -------------- 
>
>
>> What do you mean 'unconditionally execute a cgi program without user
>> interaction' ???
>>
>> CGI execution can only happen if someone goes to a website or clicks a 
>> link
>> within a website. I suppose you could make automated calls via javascript
>> with onMouseOver, or onMouseOut (or even a few other ones). However, all
>> those techniques still require a user visiting the webpage just to
>> initialize those actions.
>>
>> Please rephrase, clearly, what is you are looking to do.
>>
>> =========
>> "Socialism is the philosophy of failure, the creed of ignorance,
>> and the gospel of envy, its inherent virtue is the equal sharing of 
>> misery."
>> - Sir Winston Churchill -
>> =========
>> ----- Original Message ----- 
>> From:
>> To:
>> Sent: Tuesday, February 10, 2009 2:21 PM
>> Subject: [Xitami] Unconditional execution of a CGI in html.
>>
>>
>> >
>> > Hello,,,,, :) :)
>> >
>> > I tried to find a search method to look in the Xitami Archives for the
>> > situation described below with no luck.
>> >
>> > As a newbie using Xitami and Web Pages I have some experience but not a
>> > lot of day-to-day activity working with Xitami and/or HTML to find a
>> > solution for the following.
>> >
>> > I was looking for the method in HTML to unconditionally execute a cgi
>> > program
>> > in html without user action (i.e.) using an "image", "a href", "form
>> > field", etc.
>> >
>> > The intent is to record Xitami variables, etc. to a file on the server
>> > when the page is accessed plus in some cases output text to the Browser
>> > window that has accessed that Web Page .
>> >
>> > Several methods were found on a google search showing SSI, etc.(#exec,
>> > etc.) and none seem to work.
>> >
>> > The cgi program can be executed with the entry to the Browser address
>> > window of:
>> >
>> > http://IP_of_Xitami/cgi-bin/TEST_CGI_PROGRAM?Argument1+Argument2,,,,,,,
>> >
>> > And, the cgi programm runs as expected with the arguments found and
>> > recorded as well as a display of text to the Browser window where the
>> > above http:// is entered.
>> >
>> > The ADMIN of Xitami was used to review the settings for that WEB Page 
>> > CGI
>> > and
>> > these seem to be set to cause this to happen for that WEB Page. But, I 
>> > am
>> > not
>> > sure if a settings is required and has been overlooked and needs to be 
>> > set
>> > to
>> > cause this to happen.
>> >
>> > Or, the HTML code to cause this to happen has not been used properly in
>> > the HTML
>> > code of that WEB Page.
>> >
>> > THANKS for your time, help, and advice!!!! :) :)
>> >
>> > Jerry
>
>
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
> 




More information about the Xitami mailing list