FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


php counter





Reyntjensw
hi,

i'm searching for a php script that can:
*save an ip and write down how many pages he'd visited
*what pages (index,help,....)
*have a counter that can count the visiters but a person with an ip can only count for 1 visiter (200=>201) NOT (200=>250)


can you help me


grtz
dandelion
Perhaps, PHP HitMan?
And feel free to search SourceForge.net for more scripts. Wink
Reyntjensw
owke,

thx
mathiaus
#1 Most counters count the number of visitors. They will also log a persons IP to stop counting them again. They dont generally (I've never seen one) count how many pages each IP visits.

#2 Have seen this feature half done on a users online but it doesnt store it permanently. Have never seen this on a counter

#3 what? Confused A person with an IP can only count as 1 visitor. Well as everyone must have an IP and people only usually represnt them selfs (1 person) this is a little confusing. Unless you mean each visitor is noted once and then ignored to count the unique hits rather than counts.

Basiclly I think you'll have to code yourself or have this coded for you. We can help hers o find a script which is the closest and well halp you edit it.

Or you could make do with a normal counter or statistics script. Their is one sort of what your after in CPanel >> Web/FTP stats >> Latest visitors
Positron
Code:
$ip = $_SERVER['REMOTE_ADDR'];

-------------

$page = substr(strrchr($_SERVER['PHP_SELF'], "/"), 1);

-------------

sample with textfile

$co="bin/count.txt";
$cor=fopen($co,"r") or die("can't 1");
while(!feof($cor)) {
  $count = fgets($cor,1024);   
}

$count++;
fclose($cor);
$cow=fopen($co,"w") or die("Can't 2");
fputs($cow,$count);
fclose($cow);

echo "Online:".$count;
deciphereal
I have found that the best place to find scripts or progs that will perform the tasks you outlined is on Freshmeat.net. It is an open source software site, just in case someone is unfamiliar with it. It offers a lot of programs that can be used by a webmaster. Anything from very advanced log analyzers to forums to message boards. It also offers many cms programs and DB programs and utilities--especially mySQL.
inet
create a db to store sessions, ip, pages, compare session every time to avoid counter increase.
Related topics
free php web counter,n@log
Tutorial: PHP Installed Modules Dynamic Reference Tool
Phoenix free PHP scripts
PHP Counter?
PHP Counter
I need PHP hits code
Form Hit Counter
Counter Strike Source Clan Website
PHP Help please
Website Counter
I want to make a counter in PHP.
php Counter
Is there a site can report my site ?
Php users counter script
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.