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,839
  • 7
  • 30
  • 39
  • 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
  • 594
  • 1
  • 4
  • 19
0

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

Dutchie432
  • 28,798
  • 20
  • 92
  • 109
0
$_SERVER['REMOTE_ADDR']

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

Codemwnci
  • 54,176
  • 10
  • 96
  • 129