In certain circumstances, it's hard to tell if a site is behind Cloudflare or another proxying service. To know if this is the case, you can print the following variable.
$_SERVER['PROXY_REMOTE_ADDR']
I would also do a check to compare this with the variable $_SERVER['REMOTE_ADDR'] and if they're the same then there is a web server misconfiguration that you can warn about.
In certain circumstances, it's hard to tell if a site is behind Cloudflare or another proxying service. To know if this is the case, you can print the following variable.
$_SERVER['PROXY_REMOTE_ADDR']I would also do a check to compare this with the variable
$_SERVER['REMOTE_ADDR']and if they're the same then there is a web server misconfiguration that you can warn about.