Wo[ix]lf Posted March 16, 2005 Report Posted March 16, 2005 Kā lai panāk lai linka galā būtu apmeram tā http://saits.lv - uzklikots 3 x doma ir tāda ka vinjs ieraxta infu k-kadā txt faila... varētu vismaz kādu padomu dot vai linku ar infu...
blackhalt Posted March 16, 2005 Report Posted March 16, 2005 kaukā šitā <?php $file='counter.txt'; fclose(fopen($file,'a+b')); $f=fopen($file,'r+t'); flock($f,LOCK_EX); $count=fread($f,100); $count=$count+1; ftruncate($f,0); fseek($f,0,SEEK_SET); fwrite($f,$count); fclose($f); echo $count; ?>
рпр Posted March 17, 2005 Report Posted March 17, 2005 es buutu taisiijistaa, ka katru reizi noklikshkjinot skripts pieksiata mainigajam viens, kuru peec tam saglabaa sesijaa. iznjeemumgadiijumos, kas submito formas vai etc viens netiek pieskaitiits (to ar get parametru noraada).
Delfins Posted March 17, 2005 Report Posted March 17, 2005 es buutu taisiijistaa, ka katru reizi noklikshkjinot skripts pieksiata mainigajam viens, kuru peec tam saglabaa sesijaa. iznjeemumgadiijumos, kas submito formas vai etc viens netiek pieskaitiits (to ar get parametru noraada). 15104[/snapback] kliks (hits) - 1 refreshs hosts - 1 sessija apmeklējums uniq hosts - unikāls hosts pa periodu $cnt = @ (int) file_get_contents( 'counter.txt' ) + 1; fwrite( fopen('counter.txt','w'), $cnt );
рпр Posted March 17, 2005 Report Posted March 17, 2005 kliks (hits) - 1 refreshshosts - 1 sessija apmeklējums uniq hosts - unikāls hosts pa periodu $cnt = @ (int) file_get_contents( 'counter.txt' ) + 1; fwrite( fopen('counter.txt','w'), $cnt ); 15108[/snapback] nav jau teikts, cik ilgaa periodaa tos klikus vajag skaitiit... labāk izmantot log failus, lai apskatītos statistiku.
Delfins Posted March 17, 2005 Report Posted March 17, 2005 nav jau teikts, cik ilgaa periodaa tos klikus vajag skaitiit...labāk izmantot log failus, lai apskatītos statistiku. 15112[/snapback] nu a ja userim nav pieejami log-faili ? $fileName = sprintf( 'counter_%s.txt'", date('Ymd') );
Recommended Posts