-5

I am writing a program to enable users to register domains. So when they make errors i receive an email notifying me about the errors a user has made. So i want the user's IP Address to be included also in the email. How can i collect it?

Thanks in advance

db100
  • 55
  • 10

2 Answers2

1

You can get the user’s IP address by using the $_SERVER['REMOTE_ADDR'] or $_SERVER['REMOTE_HOST'] variables.

kakajan
  • 2,614
  • 2
  • 22
  • 39
0

You can get it by $_SERVER['REMOTE_ADDR']