Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @prambule : http://www.pcinpact.com/actu/news/51801-hadopi-wikipedia-olivier-henrard.htm
- *
- */
- function refuse($forbidden, $redirect, $email) {
- $host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
- if(substr($host, -1 * strlen($forbidden)) == $forbidden){
- header("Status: 301");
- header('Location: http://'.$_SERVER['SERVER_NAME'] . $redirect);
- mail($email,"[{$_SERVER['SERVER_NAME']}][refus de $forbidden]",$host."\n\n".print_r($_SERVER, true));
- exit;
- }
- }
- /**
- * Fonction prsente sur toutes les pages de http://www.jaimelesartistes.info :
- */
- refuse('.culture.fr', '/block.php', 'christine@jaimelesartistes.info');
- /**
- * rsultat : tout visiteur en provenance de la Rue de Valois n'a droit qu' http://www.jaimelesartistes.info/block.php
- *
- * c'est un peu puril - mais qu'est ce que a peut me faire rire
- *
- * -et a marche : dj deux alertes reues dans la bote mail-
- *
- */
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement