Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call CGI script without SSI?

Status
Not open for further replies.

DrCrazyDog

Programmer
Nov 26, 2000
8
US
Can I call a cgi script that returns html code within a page without using SSI? For example, I have a cgi script that simply prints a number that is my counter. My new host doesn't support SSI, so I need to call the cgi script without SSI. Can anyone help me?
Thanx
 
Well, you could cut up your page... everything before your counter put into header.txt. Everything after your counter, put into footer.txt.

Then, in your script:

# do counter code here...

open(HEADER,"header.txt");
@HEADER=<HEADER>;
close(HEADER);
open(FOOTER,&quot;footer.txt&quot;);
@FOOTER=<FOOTER>;
close(FOOTER);

print &quot;Content-type: text/html\n\n&quot;;
print @HEADER;
print $count;
print @FOOTER;
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top