function getip( { if ( getenv('REMOTE_ADDR') && strcasecmp( getenv('REMOTE_ADDR'), 'unknown') ) return getenv("REMOTE_ADDR"); elseif ( !empty($_SERVER['REMOTE_ADDR']) && strcasecmp($_SERVER['REMOTE_ADDR'], 'unknown')) return $_SERVER['REMOTE_ADDR']; else return "unknown"; }