PDA

View Full Version : Cgi Hit Counter


RYCHAN
14-06-2001, 21:24
Okay, I'm Very new to CGI but I've created my own ickle hit counter. it's at http://www.brit-celebs.co.uk/cgi-bin/counter.cgi and I was wandering If there's anyway that I can make this output goto a webpage at all.. say http://www.brit-celebs.co.uk

Any Ideas?

Fragmast3r
15-06-2001, 13:54
id imagine on the page u have your counter on you must of typed some sort of code that looks roughly like this

<!--#exec cgi="cgi-bin/mycounter.pl" --> (or something similar)

all u need to do is in your website where ever u want the counter to be just put the code in where the counter is to appear

RYCHAN
15-06-2001, 14:14
ohhh, sounds good, sounds quick 'n' easy too :) Cheers bud!
Will have a go at that now!

RYCHAN
15-06-2001, 14:27
Erm,Didn't work , I've tried this code as the test.htm page but it doesn't display anything.

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<font face="Tahoma" size="2"><b>

<!--#exec cgi="cgi-bin/counter.cgi" -->
</b></font>
</body>
</html>



the cgi-code which I saved as counter.cgi works fine by itself though.

Chas
15-06-2001, 21:17
Try renaming the page as test.shtml. If you want to use SSI you'll usually have to use the .shtml extension.

Cheers,

Chas

RYCHAN
15-06-2001, 23:19
Do, I didn't know that line was SSI.... Never mind :)
Thanks CHAS 'n' Fragmast3r

RYCHAN
15-06-2001, 23:26
http://www.brit-celebs.co.uk/test.shtml


same code...still doesn't appear to work though....

aef
16-06-2001, 09:37
How and whether you can include CGI scripts like that is server-dependant. The classic way to use CGI is to have a CGI script return an entire HTML page. There are many ways of organising this, but as what seems to be a commercial site, you'll need to be paying consultancy rates for specific detailed advice :)

AEF

RYCHAN
16-06-2001, 10:57
...awwww, I'll have to get in-touch with my good buddy Christoph to see about changing servers p'haps