-3

How can I get the client IP address using PHP ?

i have to show how many members using my websie

I want to keep record of the user who logged into my website through his/her IP address 
Abdul Hameed
  • 255
  • 3
  • 19
Aswad Shaik
  • 553
  • 4
  • 24

2 Answers2

0

You can use $_SERVER['REMOTE_ADDR'] to get the client IP address.

phreakv6
  • 2,075
  • 1
  • 7
  • 10
0

Try

echo $_SERVER['REMOTE_ADDR'];

DsRaj
  • 2,220
  • 1
  • 15
  • 24