Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

How to load a cgi script when the webpage loads

( #135465=categorized question: print w/ replies, xml ) Need Help??
Contributed by Voytek on Jan 01, 2002 at 05:03 UTC
Q&A  > CGI programming


Description:

Hi! Is it possible to activate a CGI script when the website loads instead of when the user clicks a button? If so, how? Thanks a lot, Voytek

Answer: How to load a cgi script when the webpage loads
contributed by jonknee

To use server side includes just add this code to your page:

<!--#exec cgi="/cgi.cgi" -->
make sure your server can handle them and name your page with the .shtml ending.
Answer: How to load a cgi script when the webpage loads
contributed by merlyn

Sure. Either make that page a CGI-generated page, or use something like Server-side Includes.

Answer: How to load a cgi script when the webpage loads
contributed by zentara

You could also load a cgi script with the image tag.

<IMG SRC="cgi-bin/myscript.pl" HEIGHT=0 WIDTH=0 alt="[script]" >
Answer: How to load a cgi script when the webpage loads
contributed by LogicalChaos

If you want the cgi script instead of a page (default.html for instance), redirect from your page to your cgi script: <META HTTP-Equiv="Refresh" CONTENT="3; URL=http://your.place.com/cgi/my.cgi">

Please (register and) log in if you wish to add an answer



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (6)
    As of 2014-10-02 04:49 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      What is your favourite meta-syntactic variable name?














      Results (49 votes), past polls