Det hedder heller ikke 'header("www.tester.dk")'. Det hedder 'header("Location: www.tester.dk")'
$this_ip = $_SERVER['REMOTE_ADDR']; $ips = "1.2.3.4,1.4.3.2"; //seperer adresser med komma $ips = explode(',',$ips); if (in_array($this_ip, $ips)) { header("Location: bla.php"); }
<html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Ny side 1</title> </head> <body><? if($_SERVER['REMOTE_ADDR']=="85.81.41.71"){ header("www.tester.dk"); } ?> </body> </html>
Takker, men det virker ikke Kode <html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Ny side 1</title> </head> <body><? if($_SERVER['REMOTE_ADDR']=="85.81.41.71"){ header("www.tester.dk"); } ?> </body> </html>