$ip = $_SERVER['REMOTE_ADDR']; if ( checa_formato_ip($ip) == 'local' ) { header("Location: pagina_local.php"); } else { header("Location: pagina_foranea.php"); }