Forum Moderators: phranque

Message Too Old, No Replies

IP is my router not the person who visits

router IP instead of their IP

         

MrGecko

12:30 am on Jun 8, 2008 (gmt 0)

10+ Year Member



Hello I am having a problem with my server where when someone visits my site it gets the router IP instead of their IP
This is the code I am using to get the IP Address
<html>
<head><title>IP Address Is</title></head>
<body>
<?=$_SERVER["REMOTE_ADDR"];?>
</body>
</html>

I am unsure if my router is acting as a proxy or not but my visitors want to see their IP.

Thanks for help,
Mr. Gecko

coopster

12:32 pm on Jun 8, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



If I am on an internal network and my connection point to the internet is a router that handles the connection, you are going to get my router's IP address, not mine.

MrGecko

3:04 pm on Jun 8, 2008 (gmt 0)

10+ Year Member



It gets My Routers IP when They visit

[edited by: MrGecko at 3:05 pm (utc) on June 8, 2008]

jdMorgan

4:24 pm on Jun 8, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Many routers can be configured to simply pass requests to your LAN server unmodified. See the "Port forwarding," "Setting up a DMZ," "Settings for LAN servers," or similarly-named sections of your router's documentation or Help pages.

Jim