Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @préambule : 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 présente sur toutes les pages de http://www.jaimelesartistes.info :
- */
- refuse('.culture.fr', '/block.php', 'christine@jaimelesartistes.info');
- /**
- * résultat : tout visiteur en provenance de la Rue de Valois n'a droit qu'à http://www.jaimelesartistes.info/block.php
- *
- * c'est un peu puéril - mais qu'est ce que ça peut me faire rire
- *
- * -et ça marche : déjà deux alertes reçues dans la boîte mail-
- *
- */
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement