Reputation: 450
Im using $_SERVER['REMOTE_ADDR']
to detect the client's IP address in PHP.
If two clients share the same IP, is it safe to assume that they are either the same PC or from the same local WiFi network?
Are there any scenarios where the remote IP will be same even if the client's are from different networks/locations. (Ex. when using 3G or GPRS?)
Thanks :)
Upvotes: 1
Views: 2551
Reputation: 522352
You cannot assume anything. Two supposedly separate visitors sharing the same IP just means that they're traversing the same proxy/NAT device at some point. This may be because they're sharing a router in their home, because they're going through the same proxy at their company network (but may be miles and miles apart in different internal networks) or because their ISP is applying carrier grade NAT routing. This is not to mention VPNs, tunnels and things like TOR.
You cannot infer anything, really.
Upvotes: 7