Categories
PHP Useful

Get HTTP Status Code from Header – PHP

1. First of all we have to: deactivate the SSL verification because there are cases in which the site is redirected from a domain where the SSL has expired! limit the number of redirects, so as not to enter an endless loop initialize User-Agent with a real value , otherwise there is the possibility that […]

Categories
Servers Useful

HTTP headers used by Cloudflare when operating as a Reverse Proxy

CF-IPCountry – This header contains the country code of the home visitor, it is a two-character value that will contain the country code, if the country is unknown, it will be “XX” True-Client-IP – Provides the IP address of the client (visitor) for each request to the source, CloudFlare adds the True-Client-IP header. Cloudflare always […]

Categories
Servers Useful

How to use Cloudflare CF-IPCountry Hader in .htaccess !

The CF-IPCountry header is specific only to those who use Cloudflare in “Proxied” mode, so if you do not use Cloudflare, then this article is not useful! 1). How to block traffic from specific countries using CloudFlare If for any reason you want to block visitors from any country, the solution is extremely simple and […]