Remote ip function
Moderator: General Moderators
Remote ip function
I am working on a survey that utilizes a mysql db and am using the useres ip address as the line validator in the database, however, I have noticed that, in conditions like an ADSL connection, the function '$remote_addr' will read the ip off of the router and not the ip from the computer itself. I have my hub set to issue ip's to the users via DHCP, is there a function that will read the DHCP issued ip and not the router ip?
Yep, there's no way to get the IP internal to the visiting user's network (ie, their router delivered address). That is an internal address and the router is going out on behalf of the computer. It's actually set up so the ip of the person is not transmitted on the internet.
You probably don't want to get that IP anyway because routers from the same company use the same naming scheme when delivering IP's. For example, all Linksys routers start delivering at 192.168.1.100 by default. So, if you have two completely different people and by some miracle from Heaven you manage to get the user's internal IP, you will have two entries for the same IP when they are, in fact, two different people.
You probably don't want to get that IP anyway because routers from the same company use the same naming scheme when delivering IP's. For example, all Linksys routers start delivering at 192.168.1.100 by default. So, if you have two completely different people and by some miracle from Heaven you manage to get the user's internal IP, you will have two entries for the same IP when they are, in fact, two different people.
Remote IP function
I had a fealing that was the case, but I just needed to make sure, thanks for your're help!!