PHP MIRRORS 3 PHP SCRIPT
Date: Mon, 30 Jun 2003 11:31:52 EDT

Subject: Php Script
From: Xtrekiee@no-spam

Hello,

I was wondering if you or someone you work with knows where I can get a php script that will block certain ip address from entering your site. Attacked is a script that i have but it only blocks by host name which i have no way of obtaining. I would greatly appreciate your help
Jeremy Cummings
<HTML><FONT FACE=3Darial,helvetica><FONT SIZE=3D2 FAMILY=3D"SANSSERIF" FACE=
=3D"Arial" LANG=3D"0">Hello,<BR>
<BR>
I was wondering if you or someone you work with knows where I can get a php=20=
script that will block certain ip address from entering your site. Attacked=20=
is a script that i have but it only blocks by host name which i have no way=20=
of obtaining. I would greatly appreciate your help<BR>
<BR>
Jeremy Cummings</FONT></HTML>

<html>

<head>
<title>Dnssolutions.org</title>
</head>

<body>

<?

function gethostname()

{

$ip =3D getenv('REMOTE_ADDR');

if (!$ip) { $ip =3D getenv('REMOTE_HOST'); }

$ip =3D @no-spam
return $ip;

}

$ip =3D gethostname();
=20=
//add ip's between the comma=
s if($ip =3D=3D "HSE-Kitchener-ppp3507402.sympatico.ca" OR $ip =3D=3D "64-205-=
168-78.client.dsl.net" OR $ip =3D=3D "AC97E478.ipt.aol.com" OR $ip =3D=3D "1=
95.218.116.8
" OR $ip =3D=3D "4.64.79.148" OR $ip =3D=3D "" OR $ip =3D=3D "" OR $ip =3D=
=3D "" OR $ip =3D=3D "")
{die("SITE IS UNAVAILABLE. PLEASE CHECK BACK SOON!!");}
else {
?>
<script language=3D"JavaScript">

var URL =3D "http://www.dnssolutions.org/index_main.html";

self.location =3D URL;
</script>
<?
}
?>

</body>

</html>
[qptext index.php]