Title: CloudFlare
Last modified: January 15, 2017

---

# CloudFlare

 *  Resolved [sus](https://wordpress.org/support/users/susgeek/)
 * (@susgeek)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cloudflare-20/)
 * What is the best geolocation api to use with Cloudflare and your plugin?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/cloudflare-20/#post-8656313)
 * Hi [@susgeek](https://wordpress.org/support/users/susgeek/),
 * Thank you for your proposal.
 * I think you mean using `$_SERVER["HTTP_CF_IPCOUNTRY"]`, am I right?
 * [What does CloudFlare IP Geolocation do?](https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-CloudFlare-IP-Geolocation-do-)
 * Or do you mean [Cloudflare API](https://api.cloudflare.com/) which doesn’t seem
   to support getting geolocation of visitors?
 * Anyway, I think if a visitor’s country code is available from the CloudFlare 
   service, the site would already be protected by the CloudFlare WAF. So I’d like
   to have your opinion what’s the benefit to use this plugin. Do you think the 
   CloudFlare service is not enough? If so, I can get motivated to implement your
   proposal.
 * Thanks.
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cloudflare-20/#post-8660218)
 * Hi [@susgeek](https://wordpress.org/support/users/susgeek/),
 * The best way for this plugin is to make a class library that utilize the CloudFlare
   API in the same way as other APIs.
 * But I think that the CloudFlare API seems not to be able to get a country code
   for any IP address. It’s not suitable for this plugin.
 * So I decided to respectfully turn down your proposal.
 * Thanks so much.
 *  Thread Starter [sus](https://wordpress.org/support/users/susgeek/)
 * (@susgeek)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cloudflare-20/#post-8661480)
 * Thank you for your reply.
 * Yes I was referring to having an option to use
 * $_SERVER[“HTTP_CF_IPCOUNTRY”];
 * On the sites that use Cloudflare I am still having attempts to access admin area
   of WordPress from countries that are not whitelisted.
 * Cloudflare has decreased attacking traffic, but not eliminated it.
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cloudflare-20/#post-8664132)
 * Hi [@susgeek](https://wordpress.org/support/users/susgeek/),
 * > Cloudflare has decreased attacking traffic, but not eliminated it.
 * OK. Thanks for this info.
 * Then I try to make a class library of CloudFlare that should be installed into
   the `/wp-content/ip-geo-api/` directory. This would not work correctly on “Search”
   tab, but would reduce the load on server compared to looking up the Maxmind database.
 * Please keep watching this thread.
    Thanks!
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cloudflare-20/#post-8683711)
 * Dear [@susgeek](https://wordpress.org/support/users/susgeek/) and all,
 * I made a API class library for CloudFlare and CloudFront. Please refer to “[CloudFlare & CloudFront API class library](http://www.ipgeoblock.com/article/api-class-library.html)“.
 * Best regards,
    tokkonopapa

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘CloudFlare’ is closed to new replies.

 * ![](https://ps.w.org/ip-geo-block/assets/icon-128x128.png?rev=1148568)
 * [IP Geo Block](https://wordpress.org/plugins/ip-geo-block/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ip-geo-block/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ip-geo-block/)
 * [Active Topics](https://wordpress.org/support/plugin/ip-geo-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ip-geo-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ip-geo-block/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/cloudflare-20/#post-8683711)
 * Status: resolved