<?php
if(!($ips_arr = file("/var/wwwdata/allowedip.txt", FILE_IGNORE_NEW_LINES))){
  include "./banned.html";
  exit();
}

$ip = $_SERVER['REMOTE_ADDR'];

if((array_search($ip, $ips_arr) === false)){
  include "./bannedip.html";
  exit();  
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<title>Moja strona WWW</title>
</head>
<body>
<div>Treść strony</div>
</body>
</html>