/[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.1 by sysadm, Thu Jun 10 11:27:10 2004 UTC Revision 1.12 by sysadm, Wed Apr 23 05:13:57 2025 UTC
# Line 1  Line 1 
1  <?  <?php
2            require_once "../lib/ip_mask.inc.php";
3  function Client_Address()  ?>
4    <?php
5    function client_addr(int $mask_level = 0) : string
6  {  {
7          if (isset($_SERVER["HTTP_X_CLIENT_ADDR"]))          $ip = (isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : "");
                 return $_SERVER["HTTP_X_CLIENT_ADDR"];  
         else  
                 return $_SERVER["REMOTE_ADDR"];  
 }  
8    
9            return ip_mask($ip, $mask_level, "%");
10    }
11  ?>  ?>


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

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