Simple Sites Forum
September 08, 2008, 06:13:03 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This is just a website to help promote simple, stylish and elegant websites. It is not to say that all simple sites = elegant sites or vice versa.

We are just trying to spread the awareness that simple sites can be stylish and elegant as well.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: CGI Script  (Read 630 times)
AuctionFreak
Newbie
*
Posts: 11


View Profile
« on: August 21, 2006, 03:36:51 PM »

This maybe in the wrong category, so please move it if it is, I'm looking for help launching a cgi script. The script works ok, but I can not find the code to insert into the html code to make it launch automaticly. So far this is what I have:

<html>
<head>
<title>cgi test</title>
</head>
<body>
<div>
<form action="cgi-bin/image.cgi" method="post">
<div>
<input type="submit" value="Call Script" />
</div>
</form>
</div>
</body>
</html>

However, this only creates a button to launch the script. I want it launched automaticly when the page is opened. Someone else suggested the code:

<!--#exec cgi="/cgi-bin/image.cgi" -->

but this has no effect. Any advice would be great.

Thxs

AuctionFreak
Logged
solidghost
Administrator
Hero Member
*****
Posts: 1267



View Profile WWW
« Reply #1 on: August 21, 2006, 04:35:33 PM »

is your cgi directory correct ?
Logged

AuctionFreak
Newbie
*
Posts: 11


View Profile
« Reply #2 on: August 21, 2006, 06:34:59 PM »

yes - because I can run the script directly from the browser address bar. however, i need it within the html code.
Logged
sacx13
Sr. Member
****
Posts: 412



View Profile WWW
« Reply #3 on: August 23, 2006, 11:52:40 AM »

You have 2 solutions:

Use SSI
<!--#exec cmd="/fullpath/cgi-bin/image.cgi" -->
or
<!--#exec cgi="/fullpath/cgi-bin/image.cgi" -->

or use system command from php if your server supports php

system(/fullpath/cgi-bin/image.cgi)

if your script is generating an image the you can loaded from img tag
<img src="/fullpath/cgi-bin/image.cgi">

I hope this tips are useful for your project Smiley

Regards
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media
Seo4Smf v0.1 © Webmaster's Talks
Valid XHTML 1.0! Valid CSS!