Re: ip checking

From: Date: Thu, 31 Aug 2000 17:53:16 +0000
Subject: Re: ip checking
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-14654@lists.php.net to get a copy of this message
global ;-) global $REMOTE_HOST; global $HTTP_X_FORWARDED_FOR; Chris On Fri, 1 Sep 2000, Worawisut Pinyoyang wrote: > > i have a problem with my function that always return empty. > > this is my code: > > function return_ip() { > $ip = getenv("HTTP_X_FORWARDED_FOR"); > if (!$ip) > { > $ip = getenv("REMOTE_ADDR"); > } > return $ip; > } > > > when i use it: > > $user_ip = return_ip(); > echo "User IP: $user_ip "; > > > and the result: > User IP: (blank) > > what's my problem and how do i solve it? > > Thanks a lot > > Worawisut > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#14654) next »