<?php
  $ips1 = file("/var/wwwdata/ips1.txt", FILE_IGNORE_NEW_LINES);
  $ips2 = file("/var/wwwdata/ips2.txt", FILE_IGNORE_NEW_LINES);
  $ips3 = file("/var/wwwdata/ips3.txt", FILE_IGNORE_NEW_LINES);

  $ip = $_SERVER['REMOTE_ADDR'];

  if($ips1 && in_array($ip,$ips1)){
    include "./index1.php";
  }
  else if($ips2 && in_array($ip,$ips2)){
    include "./index2.php";
  }
  else if($ips3 && in_array($ip,$ips3)){
    include "./index3.php";
  }
  else{
    include "./index0.php";
  }
?>
