Ip address is considered to be unique identifier of local machine. But When proxy servers are used, then every machine using the proxy server uses the same ip address. Hence the $_SERVER[] variable just gives the same ip address for all the machines. I really needed a php function to capture the ipv4 address of the machine, if not anything unique will do. So that i can identify or differentiate between users accessing the site from different machine. Please help me.
Asked
Active
Viewed 90 times
0
-
Take a look at http://stackoverflow.com/questions/4527345/determine-if-user-is-using-proxy – Niklas Modess May 31 '13 at 10:52
-
It's not possible to get the local ip-adress of a computer, otherwise routers would not work. – martinstoeckli May 31 '13 at 10:56
3 Answers
0
Have you tried the php function get_browser
?
This is not able to differentiate user with 100% success but could be a real clue as it return a 26 item array.

zeropol
- 146
- 1
- 6
0
What about setting a $_COOKIE
http://php.net/manual/en/function.setcookie.php
setcookie("was_here", $_SERVER['REMOTE_ADDR'], strtotime('+1 year')); /* expire after 1 year */

michalzuber
- 5,079
- 2
- 28
- 29
-
What a quick reply!!!! Suppose i set the cookie for a machine.. Then what? when the user again comes from that machine, will I be able to find him/her out?? If yes, how? – danish May 31 '13 at 10:54
-
http://www.w3schools.com/php/php_cookies.asp might be more what you are lookng for. – Robert Seddon-Smith May 31 '13 at 11:21
0
Could you use sessions or cookies? These can be used to differentiate between users.

Pudge601
- 2,048
- 1
- 12
- 11