How to ask "if private IP"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I use $aa=$_SERVER["REMOTE_ADDR"];

and

if(($aa=="192.168.2.108") || ($aa=="192.168.2.34")) {
    $aa="61.64.101.101";    // for testing put in a public IP   
}


However, I would like to cover all private IPs (192.168.x.x and 10.x.x.x
and 172.??.x.x). How can I do that simple?

bye

Ronald

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux