<!doctype html public "-//W3C//DTD HTML 4.0 //EN"> 
<html>
<head>
       <title>BG BRG BORG Hartberg</title>
</head>
<body>

<?php

   $i=0;

   $fd = fopen("counter/count.dat","r+");

   $count = fgets($fd,10000);
   $count=$count+0;
   $ip = getenv ("REMOTE_ADDR"); // get the ip number of the user
   $hostname=getenv("REMOTE_HOST"); // ??
   $hostname=gethostbyaddr ($ip);
//   echo $hostname;
   $markierung=0;
   /*
   if ($hostname=="www.gym-hartberg.ac.at")
   {
       $markierung=1;
       }
   if ($ip=="193.171.90.194")
   {
       $markierung=1;
    }
	*/
   if ($markierung==0)
   {
//   if (! $count)
//   $count=0;
   $count++;

   rewind($fd);
   fwrite ($fd, $count);
   fclose ($fd);

   $fd = fopen("counter/count.log","a");
   $ret=time();
   $datum=gmdate("d M Y H.i.s",$ret);
   $zeile=$count."##".$datum."##".$ip."##".$hostname."\n";
   fwrite ($fd, $zeile);

   fclose ($fd);

}
  
?>

</body>
</html>

