This module provides static methods for server variables set by CloudFlare. Future updates as needed. Meant for small projects or for stand-alone systems.
- PHP 5.3.0+
Easy install with Composer.
php composer.phar require "crit/cloudflare": "dev-master"
<?php
include "vendor/autoload.php";
use CloudFlare\CloudFlare;
$visitor_ip = CloudFlare::VisitorIP();
$visitor_country = CloudFlare::VisitorCountry();