--- fenglin/lib/client_addr.inc.php 2004/06/26 21:49:13 1.4 +++ fenglin/lib/client_addr.inc.php 2010/01/07 01:28:59 1.9 @@ -1,21 +1,21 @@ $ip) { - if (ereg($ip,$addr)) + if (preg_match("/".$ip."/",$addr)) { if ($x_addr != null) { @@ -23,9 +23,9 @@ function Client_Address($addr=null,$x_ad for($i=count($client_addr)-1;$i>=0;$i--) { $proxy = false; - foreach($proxy_ip as $ip) + foreach($proxy_ip as $tmp => $ip) { - if (ereg($ip,$client_addr[$i])) + if (preg_match("/".$ip."/",$client_addr[$i])) $proxy = true; } if (!$proxy)