View Single Post

  #1 (permalink)  
Old 11-26-2007
Ronald Wiplinger
 
Posts: n/a
Default How to ask "if private IP"?

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

Reply With Quote