How to ask "if private IP"?

From: Date: Mon, 26 Nov 2007 00:51:32 +0000
Subject: How to ask "if private IP"?
Groups: php.general 
Request: Send a blank email to php-general+get-265012@lists.php.net to get a copy of this message
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

« previous php.general (#265012) next »