Короче посмотрел чо люди советовали (через FAQ) и ... что-то не получается с отличением IE от NN
<?
if ($QUERY_STRING==""){
if(eregi("msie",$HTTP_USER_AGENT))
{
@flock($f,LOCK_EX);
$f=fopen("mozila.txt","a+");
$count_mozila=fread($f,100);
$count_mozila=$count_mozila+1;
ftruncate($f,0);
fwrite($f,$count_mozila);
fflush($f);
flock($f,LOCK_UN);
fclose($f);
echo " вы тут $count_mozila посетитель на IE .";}
if(eregi("opera",$HTTP_USER_AGENT))
{
@flock($f,LOCK_EX);
$f=fopen("opera.txt","a+");
$count_opera=fread($f,100);
$count_opera=$count_opera+1;
ftruncate($f,0);
fwrite($f,$count_opera);
fflush($f);
@flock($f,LOCK_UN);
fclose($f);
echo " вы тут $count_opera посетитель на Opere ."; }
if(eregi("Mozilla.[4.]",$HTTP_USER_AGENT))
{
@flock($f,LOCK_EX);
$f=fopen("nn.txt","a+");
$count_nn=fread($f,100);
$count_nn=$count_opera+1;
ftruncate($f,0);
fwrite($f,$count_nn);
fflush($f);
@flock($f,LOCK_UN);
fclose($f);
echo " вы тут $count_nn посетитель на NN ."; }
}
if ($QUERY_STRING=="stat"){
$m=fopen("mozila.txt","r");
$count_mozila_stat=fread($m,100);
fclose($m);
$o=fopen("opera.txt","r");
$count_opera_stat=fread($o,100);
fclose($o);
$n=fopen("nn.txt","r");
$count_nn_stat=fread($n,100);
fclose($n);
echo"<img border=\\"0\\" src=\\"1.gif\\" width=\\"$count_mozila_stat\\" height=\\"20\\">
";
echo"<img border=\\"0\\" src=\\"2.gif\\" width=\\"$count_opera_stat\\" height=\\"20\\">
";
echo"<img border=\\"0\\" src=\\"1.gif\\" width=\\"$count_nn_stat\\" height=\\"20\\">
";
}
?>