Re: [PHP] IP adress problem

2003-09-16 Thread Jason Sheets
Try using global $HTTP_SERVER_VARS at the top of your function or using the $_SERVER super global which is automatically global. Jason Webmaster wrote: Hi, why doesn't this work? ## IP FUNCTIONS ## function assignClientIP() { if (getenv('HTTP_X_FORWARDED_FOR') == '') { $this->aCustomer->setCl

[PHP] IP adress problem

2003-09-16 Thread Webmaster
Hi, why doesn't this work? ## IP FUNCTIONS ## function assignClientIP() { if (getenv('HTTP_X_FORWARDED_FOR') == '') { $this->aCustomer->setClientIP((!empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE