First I am very much the newbie with php and coding.
I am trying to create a script that will check the users IP then check if the user is Internal (10.x.x.x) or is External. The page will then load the correct menu.
Here is what I am using:
<?
$ip = GetHostByName($REMOTE_ADDR);
if ($ip < 10.255) include("internal_menu.php");
else include("external_menu.php");
?>
I believe that works. Is there a better way of doing this? When ever I used a longer IP address like the following:
($ip = 10.1.1.0)
I would get an error message. Any ideas on how to include a full IP address?
Thank you!
-Tam