Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
February 09, 2012, 01:33:34 PM

Pages: [1]   Go Down
  Print  
Author Topic: help !!! (hit counters)  (Read 573 times)
krusher
Trekkie
**
Offline Offline

Posts: 10


WWW
« on: September 02, 2001, 01:50:00 PM »

ok i surfed the web looking for anwsers and i found nothing of what i was looking for.
 Can anyone help me i´m trying to make a hit counter to a web page but i dont have the minimum clue how to do it, i´ve in my possesion some hit counters but i dont know how to make them work, ill post them in a dnload page for you guyes to take a look. Maybe you can figure out how to make the work please you are my only hope
   here is the link to it hit counters

       Thanks for all the help til now Solaris
Logged

Simplicity is the key to understanding
                   Vinicius Silva
stephan
Guest
« Reply #1 on: September 02, 2001, 03:15:00 PM »

If you have an upgraded account, you can use PHP.

Rename your page to whatever.php

then put this inside it, at the point where you want the counter to appear.
Make sure you create a file called count.txt. If you don't, it might be created automatically the first time you run the program, but I'm not sure.

<?
$counter_file = ("count.txt");
//now we open the file
$visits = file($counter_file);
//this increments the counter value by 1
$visits[0]++;
//now we will open the counter file for
//writing "w"
$fp = fopen($counter_file , "w");
//put the new count value into the counter
//file
fputs($fp , "$visits[0]");
//close the file
fclose($fp);
//display the count
echo $visits[0];
?>


I think that the above solution is the easiest. You can see if working on my webpage. http://www.uglypeople.co.uk

The files you put up all use cgi, which is good too.

Remember, that to use PHP or CGI/Perl, you must have a paid account. Free ones do not include this service, however, you can still have a counter by logging into your page and clicking on counters. Or whatever it says...

Good luck,

[ September 02, 2001: Message edited by: Stephan ]
Logged
Ice
Galactic Royalty
*****
Offline Offline

Posts: 259


WWW
« Reply #2 on: September 02, 2001, 09:27:00 PM »

Hi  

If you are looking for a simple counter/site tracker, check out Ezstats4all. All you have to do is sign up, then cut/paste the code they will provide onto your pages and that's it!  

Oh, forgot to mention that I use this service myself and it's fast. I only use the site tracker coz that's invisible.  

[ September 03, 2001: Message edited by: Ice ]
Logged

Flipside Gin
A site for Cases ladder gin players at Flipside.com
 http://www.lunarpages.com/fsgin
Pages: [1]   Go Up
  Print  
 
Jump to: