$log = 'contador.log';
$IP = getenv('REMOTE_ADDR');
$add = true;
$hits = 0;
$dia = date("d");
$mes = date("n");
$ano = date("Y");
$data="$dia-$mes-$ano";
$IP="$IP/$data";
if (!file_exists ($log)) {
echo "Error: $log does not exist.";
exit;
}
$h = fopen ($log, 'r');
while (!feof ($h)) {
$line = fgets ($h, 4096);
$line = trim ($line);
if ($line != '')
$hits++;
if ($line == $IP)
$add = false;
}
fclose($h);
if ($add == true) {
$h = fopen ($log, 'a');
fwrite($h, "
$IP");
fclose($h);
$hits++;
}
//echo $hits;
?>
Departamento de Matemática - PUC-Rio
Permanent Faculty
Name: George Svetlichny
Title Doutor, Princeton University, 1968.
Office: L854
Position: Emeritus Professor
Phone: 3527-1736
E-mail: svetlich
Research Areas: Mathematical Physics
Mathematics Department / PUC-Rio
Rua Marquês de São Vicente, 225 - Edifício Cardeal Leme, sala 862 - Gávea - Rio de Janeiro - CEP 22451-900
Telefones: (+55-21) 3527-1280, (+55-21) 3527-1281, Fax: (+55-21)3527-1282
| Powered by Takezo Digital