[SOLVED] IP Address doesn't work

Hi folks,

the following code:


echo 'Your IP adress is: '.CHttpRequest::getUserHostAddress();

[/indent]should show my IP-adress

The ‘funny’ result is:


Your IP adress is: ::1 	

[/indent]? Any idea ?

Using win 7, and both stacks IP4 and IP6 are installed. Could that be the problem ?



[indent] [/indent]

The function getUserHostAddress() is not a static function. Try


Which is the expected output since you have ipv6 enabled : ::1 stands for in ipv6. See wikipedia for more details.

Yepp - that it is.

After disabling the IPv6 stack, I get the known

I will read more about v6 and include it in my application tp support v6.