/[LeafOK_CVS]/fenglin/lib/client_addr.inc.php
ViewVC logotype

Diff of /fenglin/lib/client_addr.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 by sysadm, Sun Jun 27 00:39:39 2004 UTC Revision 1.6 by sysadm, Sat Mar 12 08:01:18 2005 UTC
# Line 10  function Client_Address($addr=null,$x_ad Line 10  function Client_Address($addr=null,$x_ad
10          if ($addr == null)          if ($addr == null)
11                  $addr = $_SERVER["REMOTE_ADDR"];                  $addr = $_SERVER["REMOTE_ADDR"];
12    
13          if ($x_addr == null && isset($_SERVER["HTTP_X_CLIENT_ADDR"]))          if ($x_addr == null && isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
14                  $x_addr = $_SERVER["HTTP_X_CLIENT_ADDR"];                  $x_addr = $_SERVER["HTTP_X_FORWARDED_FOR"];
15    
16          foreach($proxy_ip as $ip)          foreach($proxy_ip as $ip)
17          {          {
18                  if (ereg($ip,$addr))                  if (ereg($ip[0],$addr))
19                  {                  {
20                          if ($x_addr != null)                          if ($x_addr != null)
21                          {                          {


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1