I want to get the visitor's(users) ip address, for which i have tried like below:
$remoteAddr = Mage::helper('core/http')->getRemoteAddr(true);
echo "<pre>"; print_r($remoteAddr); echo "</pre>";
Im running on Xampp in windows and the above code returns output like below which is not even like ::1 (Tried in all browsers too!!)
Is the code right in magento.
I found out the below stackposts to see the fix why localhost returns ::1 which is equivalent of ipV6 address
Should a MAMP return ::1 as IP on localhost?
I did change the apache2/httpd.conf
Listen 80
Make it look like this:
Listen 127.0.0.1:80
But it still displays the same.
Is it right in localhost?