Not sure if this will work or not, but try this:
<?
$ip = $_SERVER['remote_addr'];
$filename = '/path/to/file.txt';
$fp = fopen( $filename, 'r' );
$file_contents = fread( $fp, filesize( $filename ) );
fclose( $fp );
$ips = explode ( "\n", $file_contents );
foreach ( $ips as $line )
{
list( $ip2 ) = explode( '', $line );
}
if ( $ip2 == $ip )
{
echo"Your secret message here!!!!";
}
else
{
echo"You are not allowed in here!!";
}
?>
Now if this is correct, the only thing you will have to do with it is this:
1). Make a txt file with all the ip's that are allowed with an enter inbetween each one.
Example:
ip1
ip2
ip3
ip4
ip5
2). Then modify the above script to point to the nessecarry file.
-Blake