Welcome, Guest!!
follow us on... rss

Author Topic: BotScout and Cloudflare  (Read 4818 times)

Mike

  • Administrator
  • Sr. Member
  • *****
  • Posts: 300
    • View Profile
BotScout and Cloudflare
« on: May 10, 2014, 10:14:40 AM »
A user sent in this note regarding using BotScout with Cloudflare:


To work behind cloudflare your general code needs to be updated as follows:

Code: [Select]
// get the IP address
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))  $XIP =
  $_SERVER['HTTP_CF_CONNECTING_IP]';  else $XIP = $_SERVER['REMOTE_ADDR]';

//$XIP = $_SERVER['REMOTE_ADDR'[;



For those who aren't familiar with Cloudflare, this is a description of their service:

"CloudFlare protects and accelerates any website online. Once your website is a part of the CloudFlare community, its web traffic is routed through our intelligent global network. We automatically optimize the delivery of your web pages so your visitors get the fastest page load times and best performance. We also block threats and limit abusive bots and crawlers from wasting your bandwidth and server resources. The result: CloudFlare-powered websites see a significant improvement in performance and a decrease in spam and other attacks."
« Last Edit: May 10, 2014, 10:16:41 AM by Mike »
Please don't PM me for assistance- post your questions in the forum where others can see them.