Remote ip function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
syntax406
Forum Newbie
Posts: 7
Joined: Mon Mar 01, 2004 3:57 pm

Remote ip function

Post by syntax406 »

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?
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Not that i know off !


[correct me if i am wrong]
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

i am going to go with the above post as well.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

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.
syntax406
Forum Newbie
Posts: 7
Joined: Mon Mar 01, 2004 3:57 pm

Remote IP function

Post by syntax406 »

I had a fealing that was the case, but I just needed to make sure, thanks for your're help!!
Post Reply