vngx
April 21, 2015, 12:29pm
1
Hi there
I am using XMAPP server for PHP development but in my case my localhost IP address 127.0.0.1 is not displaying in web browser.
This is my Script
<?php $ip_address=$_SERVER['REMOTE_ADDR'];echo 'IP Address '.$ip_address;
?>
and I am getting address like this
IP Address ::1
What’s wrong with my code?
Thanks
That’s the IPV6 format, and is pretty common when dealing with localhost. I’m guessing that when you deploy the code, it’ll display the typical IPV4 format.
Nothing - that answer means it is working correctly.
vngx
April 22, 2015, 1:15pm
4
So How can I get address in IPv4 format?
It’s based on how your server is set up. Since you’re only having the problem with localhost, don’t worry about it.
system
Closed
July 22, 2015, 8:48pm
7
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.