Jump to content

[SOLVED] IP redirect help


mackiefan2004

Recommended Posts

I need a little help as to why this script errors at line 9:

 

<?php

 

// Get IP address

$ips = explode('.', $_SERVER['HTTP_CLIENT_IP']);

$bldg = $ips[2]

 

// Redirect based on IP to correct building directory

 

if ($bldg==34)

{

header( 'Location: http://127.0.0.1/adminapps/osh' );

exit();

}

 

else

{

header( 'Location: http://127.0.0.1/adminapps/menu.html' );

exit();

}

 

?>

Link to comment
https://forums.phpfreaks.com/topic/159963-solved-ip-redirect-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.