Guest User

Untitled

a guest
Aug 5th, 2009
1,621
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /**
  4.  * @préambule : http://www.pcinpact.com/actu/news/51801-hadopi-wikipedia-olivier-henrard.htm
  5.  *
  6.  */
  7. function refuse($forbidden, $redirect, $email) {
  8.     $host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
  9.     if(substr($host, -1 * strlen($forbidden)) == $forbidden){
  10.         header("Status: 301");
  11.         header('Location: http://'.$_SERVER['SERVER_NAME'] . $redirect);       
  12.         mail($email,"[{$_SERVER['SERVER_NAME']}][refus de $forbidden]",$host."\n\n".print_r($_SERVER, true));
  13.         exit;
  14.     }
  15.    
  16. }
  17.  
  18. /**
  19.  * Fonction présente sur toutes les pages de http://www.jaimelesartistes.info :
  20.  */
  21. refuse('.culture.fr', '/block.php', 'christine@jaimelesartistes.info');
  22.  
  23. /**
  24.  * résultat : tout visiteur en provenance de la Rue de Valois n'a droit qu'à http://www.jaimelesartistes.info/block.php
  25.  *
  26.  *  c'est un peu puéril - mais qu'est ce que ça peut me faire rire
  27.  *
  28.  *  -et ça marche : déjà deux alertes reçues dans la boîte mail-
  29.  *
  30.  */
  31.  
  32.  
  33. ?>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×