i need a page counter for my intrAnet..

J

jkoXP

Guest
#1
cgi, dosnt matter, just one that looks good, or somethign that I can make my own images out of... thanks for the help!
 

SPeedY_B

I may actually be insane.
#2
Do you have PHP ?

I'll paste the code anyway as someone else may find it useful .... :)

PHP:
<?php
if (file_exists("site/inc/visits.txt")) {
$file = fopen("site/inc/visits.txt", "r+");
flock($file, 1);
$count = fgets($file, 4096);
$count += 1; 
fseek($file,0);
fputs($file,$count);
flock($file, 3);
fclose($file);
}
$timeout = time()-(60*$timer);
?>
this example is from my site and records hits to /home/speedyb/public_html/site/inc/visits.txt
 
J

jkoXP

Guest
#3
does this display the the number on the site?

im running windows 2000 server, and IIS, i think it does support PHP....
 

SPeedY_B

I may actually be insane.
#6
Originally posted by jkoXP
does this display the the number on the site?

im running windows 2000 server, and IIS, i think it does support PHP....
hah, sorry, i completely forgot to mention ...
PHP:
<?include("site/inc/visits.txt");?>
use that where-ever you want to display the number (i forgot about it as i have it in my <title> tags, so i didnt notice it :)
 
J

jkoXP

Guest
#7
Originally posted by SPeedY_B
hah, sorry, i completely forgot to mention ...
PHP:
<?include("site/inc/visits.txt");?>
use that where-ever you want to display the number (i forgot about it as i have it in my <title> tags, so i didnt notice it :)
I did all of that, but it dosnt seem to be working?
 

SPeedY_B

I may actually be insane.
#8
You absolutely sure you have PHP ?
create a new page with just this in..
PHP:
<?echo "hello world";?>
then open it through a browser and "hello world" should be printed.
 
J

jkoXP

Guest
#9
Originally posted by SPeedY_B
You absolutely sure you have PHP ?
create a new page with just this in..
PHP:
<?echo "hello world";?>
then open it through a browser and "hello world" should be printed.
it didnt.. so how do i setup IIS so it supports php, and perl and cgi?

thanks for the help!
 
J

Jason Roberts

Guest
#10
Where can I download and install PHP. Is that for the internet or locally on the computer? Do I need the net to run PHP?
 
J

jkoXP

Guest
#13
ok, so I can now view php files on my windows 2000 server box thanks to you guys..

but, when I go to open the PHP file on a diff machine, the php page comes up blank (no hello world).. what did I do wrong??
 
#15
Originally posted by jkoXP
ok, so I can now view php files on my windows 2000 server box thanks to you guys..

but, when I go to open the PHP file on a diff machine, the php page comes up blank (no hello world).. what did I do wrong??
Just type in http://server/path/page.php and it should work. There should be no difference between running it locally or remotely.
 

Members online

No members online now.

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,971
Messages
673,299
Members
89,016
Latest member
Poseeut