DEV Community

Discussion on: An easy way to get the (real) client IP in PHP

arvin profile image

Good post Rogerio :)

I also had to unmask the real IP when I started using Cloudflare.
Since my projects were hosted on my own server and it was more than one project, I decided to use mod_remoteip instead of tweaking the code everywhere, and already get the real IP when I’m using $_SERVER[‘REMOTE_ADDR’].

More on this for those who are in the same situation:

rogeriotaques profile image
Rogerio Taques Author

That’s an awesome solution, Arvin! Thanks for sharing. 🙏👏🤩