Recently I started using CloudFlare on my OpenCart Store (www.scriptstore.xyz) and as expected, first thing I noticed is at Online Report, real visitors IP addresses were replaced by CF IP addresses.
There is a really easy trick to get visitors real IP addresses again, by following these steps.
1) Open: system/startup.php
2) Add code following code right before "// Windows IIS Compatibility":
Code: Select all
// CloudFlare IP Fix
if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}