Different ways to get an IP address in PHP with Cloudflare, internal proxy, and more

Tiempo de lectura: 2 minutosWe will learn how to get the IP address in PHP even if our server is masked from Cloudflare, Nginx Proxy or not using any type of proxy. We will first create a new PHP file called ip_config.php To get the IP address we will use the following function: <?php function getIP(): string { if … Read more