IP address shows routers ip instead of users
Posted: Wed Apr 22, 2015 8:15 am
Greetings friends.
I have setup a internal web server for testing purpose.
and have a .php script that should display the ip address of the client that accessed the page
IP address shows routers ip instead of users
Instead of showing the IP Address of the client it is showing the router's IP Address. 192.168.3.1
Is there any way i can show the real IP of clients accessing the Web server via PHP Script.
Thanks
I have setup a internal web server for testing purpose.
and have a .php script that should display the ip address of the client that accessed the page
IP address shows routers ip instead of users
Code: Select all
<?php
$ipadress = $_SERVER['REMOTE_ADDR'];
echo "Your IP Address is $ipadress";
<?
Either from Inside LAN or from Outside World it's showing the IP Address of the router interface.Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
1 192.168.6.1/24 192.168.6.0 wlan1
2 192.168.2.1/24 192.168.2.0 e2-LAN
3 192.168.3.1/24 192.168.3.0 e3-WS
4 D182.xx.xx.xx/32 182.xx.xx.xx ppp
Is there any way i can show the real IP of clients accessing the Web server via PHP Script.
Thanks