In this article, I’ll show you how to make use of their services.
CloudFlare provides the verious client information via
HTTP request headers. For example, an IP address can be
CF-Connecting-IP and the country code from
So here is a sample of 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
You might wonder why
Well, it’s just a matter of convenience for this plugin to give it a highest priority!
The advantage of using these libraries is definitely the response time that is important especially for front-end. It’s almost zero.
On the other hand, the disadvantage is any IP address can not be retrieved on “Search” tab. In this case, you should just select other API .