All pastes #285112 Raw Edit

Sans titre

public php v1 · immutable
#285112 ·published 2006-12-19 16:49 UTC
rendered paste body
<?php// =============================================// Info ip/fai/routeur block for PHP-Nuke// michaelk 2006// michaelk@emule-inside.net// Version 1.0// ==============================================// This program is free software. You can redistribute it// and/or modify it under the terms of the GNU General// Public License as published by Free Software Foundation// ==============================================if (eregi("block-infoip.php",$_SERVER['PHP_SELF'])) {    Header("Location: index.php");}$ip = $_SERVER['REMOTE_ADDR'];   //recuperation du host$host = gethostbyaddr($ip); function detect_fai() // Detetection du FAI - liste a completer{$fai="<a href=\"http://config.emule-inside.net\"><img src=\"images/unknown.png\" alt=\"HowTo\" border=\"0\" target=\"blank\"></a>";$ip = $_SERVER['REMOTE_ADDR'];$host = gethostbyaddr($ip);if (eregi("wanadoo", $host))$fai="<a href=\"http://www.emule-inside.net/emule/routeurs/wanadoo_livebox.htm\"><img src=\"images/fai/orange-p.jpg\" alt=\"\" border=\"0\" target=\"blank\"></a>";else if(eregi("proxad", $host))$fai="<a href=\"http://www.emule-inside.net/emule/routeurs/freebox_v4.htm\"><img src=\"images/fai/free-p.jpg\" alt=\"\" border=\"0\" target=\"blank\"></a>";else if(eregi("^aol", $host))$fai="<a href=\"http://www.emule-inside.net/emule/routeurs/aolbox.htm\"><img src=\"images/fai/aol-p.jpg\" alt=\"\" border=\"0\" target=\"blank\"></a>";else if(eregi("numericable", $host))$fai="<a href=\"http://www.numericable.fr\"><img src=\"images/fai/numericable-p.jpg\" alt=\"\" border=\"0\" target=\"blank\"></a>";else if(eregi("tiscali", $host))$fai="<a href=\"http://www.emule-inside.net/emule/routeurs/alicebox.htm\"><img src=\"images/fai/alice-p.jpg\" alt=\"\" border=\"0\" target=\"blank\"></a>";else if(eregi("gaoland", $host))$fai="<a href=\"http://www.emule-inside.net/emule/routeurs/neufbox.htm\"><img src=\"images/fai/neuftel-p.jpg\" alt=\"\" border=\"0\" target=\"blank\"></a>";else if(eregi("club-internet", $host))$fai="<a href=\"http://www.club-internet.fr\"><img src=\"images/fai/club-p.jpg\" alt=\"\" border=\"0\" target=\"blank\"></a>";else if(eregi("tele2", $host))$fai="<a href=\"http://www.tele2.fr\"><img src=\"images/fai/tele2-p.jpg\" alt=\"\" border=\"0\" target=\"blank\"></a>";else if(eregi("noos", $host))$fai="<a href=\"http://www.noos.fr\"><img src=\"images/fai/noos-p.jpg\" alt=\"\" border=\"0\" target=\"blank\"></a>";else if(eregi("cegetel", $host))$fai="<a href=\"http://config.emule-inside.net\"><img src=\"images/fai/cegetel-p.jpg\" alt=\"\" border=\"0\" target=\"blank\"></a>";return $fai;}$faidet = detect_fai();function detect_nav() // Detection du navigateur - liste a  completer{$nav="inconnu ou non r&eacute;f&eacuterenc&eacute";if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Mozilla"))$nav="Firefox";if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Netscape"))$nav = "Netscape";else if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Safari"))$nav = "Safari";else if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Firefox"))$nav = "Firefox";else if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Konqueror"))$nav="Konqueror";else if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Epiphany"))$nav="Epiphany";else if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Lynx"))$nav="Lynx";else if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "MSIE"))$nav ="Internet Explorer";if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Opera"))$nav="Opera";return $nav;}$navdet=detect_nav();function detect_os() // Detection du systeme d'exploitation - liste a completer{$os="inconnu";if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Windows NT 5.1"))$os="Windows XP";if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Windows NT 5.0"))$os="Windows 2000";else if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Windows 98"))$os="Windows 98/Millenium";else if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Mac"))$os="Macintosh";else if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Linux"))$os="Linux";else if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "Unix"))$os="Unix";else if(strchr($_SERVER[ 'HTTP_USER_AGENT' ], "FreeBSD"))$os="FreeBSD";return $os;}$osdet=detect_os();$content .= "<center><i>ton ip (publique):</i><br>$ip<br><br></center>";$content .= "<center><i>ton fournisseur d'acc&eacute;s:</i></center>";$content .= "<br><center>$faidet<br>Clique sur l'image</center>";$content .= "<center>pour configurer ton modem/routeur</center><br><br>";$content .= "<center><i>ton navigateur:</i><br>$navdet<br><br></center>";$content .= "<center><i>ton OS</i><br>$osdet</center><br>";if(strchr($osdet,"Windows")){$content .= "<center><img src=\"images/xp.gif\"></center>";}if(strchr($osdet,"Linux")){$content .= "<center><img src=\"images/Trustix.gif\"></center>";}if(strchr($osdet,"FreeBSD")){$content .= "<center><img src=\"images/FreeBSD.gif\"></center>";}?>