At 16:09 01.03.2001, Nazoréen said:
--------------------[snip]--------------------
>there are 3 networks, each of them have a mask : (it is not necessary to
>know these parameters i think !)
>198.143.15.255 (255.255.255.0)
>202.139.84.255 (255.255.255.128)
>210.176.142.255 (255.255.255.192)
>
>When a user will connect, his IP will be between 198.143.15.0 and
>198.143.15.255 or between 202.139.84.0 and 202.139.84.255 or between
>210.176.142.0 and 210.176.142.255
>
>So if someone else connect without using my network, the system disallow him
>and redirect in 403 Page.
--------------------[snip]-------------------- 

Anthony,

given the function contains_ip from my earlier post, you would code:

<?php

if (!contains_ip("198.143.15.255", "255.255.255.0", $REMOTE_ADDRESS) &&
    !contains_ip("202.139.84.255", "255.255.255.128", $REMOTE_ADDRESS) &&
    !contains_ip("210.176.142.255", "255.255.255.192", $REMOTE_ADDRESS))
{
   header("403 Forbidden");
   echo "<h1>Access Forbidden</h1>You may not come here from outside our
domain";
   exit();
}
process_domain_app();
?>

     ...ebird

   >O     Ernest E. Vogelsinger
   (\)    http://www.1-at-web.at/
    ^     ICQ#   13394035


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to