duanchi4544 2015-09-24 09:32
浏览 26

如何在Php中收集IP地址[重复]

This question already has an answer here:

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

</div>
  • 写回答

2条回答 默认 最新

  • douliang2167 2015-09-24 09:37
    关注

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

    评论

报告相同问题?