Click to See Complete Forum and Search --> : counter of visits on my site???


Dukaduka
10-14-2003, 01:56 PM
Hello guys,

Does someone know if there is an easy way to install a counter of the visits on my site on Dreamwaver 4 ( without inserting code).

Thank you for your help,

Douchka

PeOfEo
10-14-2003, 05:15 PM
No. You are going to have to incert code no matter what or use another file that redirects to your site unless you are using a url redirect service already and this will not count hits to your real url.

Dukaduka
10-15-2003, 01:40 PM
Thank you. It will be hard for me because I don't understand a lot about code, but if that the way to do it.... Would you have some simply code yet ready to insert?

Thank you,
Douchka

pyro
10-15-2003, 02:04 PM
If your server supports PHP, you could use something like this:


<?PHP
$file = "counter.txt"; #chmod to 666
$contents = @file($file); #open the file for reading
$count = $contents[0]; #put the first line of $contents into $count
$count++; #increment $count by 1
$fp = fopen($file, "w"); #open the file for writing.
flock ($fp, LOCK_EX); #lock the file
echo $count;
fwrite ($fp, $count); #write count to the file
flock($fp, LOCK_UN); #release the file
fclose ($fp); #close the file
?>

PeOfEo
10-15-2003, 04:31 PM
I suggest you go to a tracking service that way it can do more for you rather then just count. go to www.extreme-dm.com and setup an account and then place the snipit of code they give you on the page you want tracked. The reason I reccomed their service as apposed to others and even pyros script is that it does not require that your server supports any server side language and it tracks more then just hits but rather visits uniquie visits client addresses and host names operating systems browsers etc. This service is also free.