Ginja_Ninja Posted June 29, 2005 Posted June 29, 2005 Hi there, i am using php and wish to view the ip address of a visitor. I notice that when in the cPanel it gives my ip address and its bang on, but when i use $_SERVER["REMOTE_ADDR"]; in my own code, its not the same. I think the php code above shos my ISP Proxy IP Address. This is not my actuall ip. How can i get the accuracy that cPanel shows?? Is there something else i need to do to this php function ?? Thanks for your thoughts. G_N Quote
Ayman Posted June 29, 2005 Posted June 29, 2005 If you use a proxy, your IP will be in the x-forwarded-for header, check out the examples on this page: http://www.php.net/getenv To get an idea of how to find the correct IP address. HTH Quote
Ginja_Ninja Posted June 29, 2005 Author Posted June 29, 2005 Thanks, i am not behind a proxy at my end. I have looked at some of the exaples, and have managed to get what i need. Thanks again Take Care G_N Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.