yea i need something for AOL users also .. down here is the script i found somewhere long time ago but still works perfect
For example: include("banip.php");
Use which script you want, with or without a database. Copy and create a file called banip.php
The following code is for use without a Database. Copy the If statement entirely to add more addresses.
Code:
<?
//Following line used for testing
//echo $REMOTE_ADDR;
if ($REMOTE_ADDR == "1.1.1.1")
{
echo "
Entry to Denied!</p>";
exit("Your priviliages to view the information contained on this site have been revoked.");
}
if ($REMOTE_ADDR == "0.0.0.0")
{
echo "
Entry to Denied!</p>";
exit("Your priviliages to view the information contained on this site have been revoked.");
}
?>
The following code is for use with a MySQL Database. Use the SQL code below to create the db on your server. Replace every variable starting with "Your..." with YOUR information.
Code:
<?
//Following line used for testing
//echo $REMOTE_ADDR;
//Put IPs into DB and seach for IP
mysql_pconnect("localhost","YourUserID","YourPassword");
mysql_select_db("YourDatabaseName");
$ipaddress = getenv("REMOTE_ADDR");
$ipresult = mysql_db_query ("YourDatabaseName","SELECT ipaddress FROM IPAddresses WHERE ipaddress='$ipaddress'");
if($ipresult) {
if(mysql_fetch_row($ipresult)) {
echo "
Entry Denied!</p>";
exit("Your priviliages to view the information contained on this site have been revoked.");
}
}
?>
SQL Code: Don't forget to add IP addresses to the table!
Code:
DROP TABLE IF EXISTS IPAddresses;
CREATE TABLE IPAddresses (
ipaddress char(20) NOT NULL default '0',
PRIMARY KEY (ipaddress),
UNIQUE KEY ipaddress (ipaddress)
) TYPE=MyISAM;