Oppure

Loading
31/07/10 8:25
Denis442
Ok grazie a tutti ho risolto: ip.php:
<?php 
$ip = $_SERVER['REMOTE_ADDR'];
$file = fopen("ip.txt", "r") or exit("Errore nell' apertura del file con la lista dei ban!");
while(!feof($file))
  {
  $ban = fgets($file);
  if ($ban == $ip) {
     Header("HTTP/1.1 301 Moved Permanently");
     Header("http://Location: denisbenato.webmatrix01.cytanium.com/ipBan.html");
    }
  }
fclose($file);
Header("HTTP/1.1 301 Moved Permanently");
Header("Location: http://denisbenato.webmatrix01.cytanium.com/index.html");
?>


ip.txt:
xxx.xxx.xxx.xxx


ipBan.php:
<html>
  <head>
      <title>Sei stato bannato!</title>
  </head>
  <body>
      <p>Il tuo indirizzo ip non è abilitato alla navigazione nel sito!</p>
  </body>
 </html>
aaa