Changeset 104 for devel/www/global.php


Ignore:
Timestamp:
Aug 3, 2008, 6:51:53 PM (16 years ago)
Author:
george
Message:
  • Opraveno: Zjištování vzdálené IP adresy klienta
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/www/global.php

    r100 r104  
    156156{
    157157  if(array_key_exists('HTTP_X_FORWARDED_FOR',$_SERVER)) $IP = $_SERVER['HTTP_X_FORWARDED_FOR'] ;
    158   else $IP = $_SERVER['REMOTE_ADDR'];
    159   //if($IP == '127.0.0.1')
     158  else if(array_key_exists('REMOTE_ADDR', $_SERVER)) $IP = $_SERVER['REMOTE_ADDR'];
     159  else $IP = '0.0.0.0';
    160160  return($IP);
    161161}
Note: See TracChangeset for help on using the changeset viewer.