0

Possible Duplicate:
How do I find a user's IP address with PHP?

How to find the ip address of the users, who login into my site,php

Community
  • 1
  • 1
Linto P D
  • 8,059
  • 6
  • 28
  • 38
  • Duplicate of [How do I find a user's IP address with PHP](http://stackoverflow.com/questions/55768/how-do-i-find-a-users-ip-address-with-php). – netcoder Jan 03 '11 at 21:23

3 Answers3

0

$ip = $_SERVER['REMOTE_ADDR'] should do the trick.

Austin M
  • 584
  • 1
  • 4
  • 19
0

PHP provides $ip = $_SERVER['REMOTE_ADDR']

Dutchie432
  • 28,462
  • 20
  • 90
  • 109
0
$_SERVER['REMOTE_ADDR']

Will return the IP address where the request came from. This may be the proxy IP address however.

Codemwnci
  • 52,744
  • 10
  • 95
  • 127