In this article, I’ll show you how to make use of their services.
Cloudflare provides the various client information via HTTP request headers. For example, an IP address can be retrieved from
CF-Connecting-IP and the country code from
So here is a sample of the API class library for Cloudflare.
The key point here is that the above library should be named as
class-zcloudflare.php and typically placed under the directory named
You might wonder why
Well, it’s just a matter of convenience for this plugin to give it the highest priority!
Pros and Cons
The advantage of using these libraries is definitely the response time that
is important especially for the front-end. It’s almost zero.
On the other hand, the disadvantage is any IP address can not be retrieved on the “Search” tab. In this case, you should just select another API 😉.