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
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
2 matches
Mail list logo