BotScout

General Category => BotScout Discussion => Topic started by: Mike on May 10, 2014, 10:14:40 AM

Title: BotScout and Cloudflare
Post by: Mike on May 10, 2014, 10:14:40 AM
A user sent in this note regarding using BotScout with Cloudflare (https://www.cloudflare.com/):


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 (https://www.cloudflare.com/), 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."