Plugin Author
Damian
(@timersys)
Hi Marius,
Do you know PHP ? Try creating a test page and print the following:
echo isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : 'no-ip';
// cloudflare
echo isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : 'no-ip';
// reblaze
echo isset( $_SERVER['X-Real-IP'] ) ? $_SERVER['X-Real-IP'] : 'no-ip';
// Sucuri
echo isset( $_SERVER['HTTP_X_SUCURI_CLIENTIP'] ) ? $_SERVER['HTTP_X_SUCURI_CLIENTIP'] : 'no-ip';
// Ezoic
echo isset( $_SERVER['X-FORWARDED-FOR'] ) ? $_SERVER['X-FORWARDED-FOR'] : 'no-ip';
// akamai
echo isset( $_SERVER['True-Client-IP'] ) ? $_SERVER['True-Client-IP'] : 'no-ip';
// Clouways
echo isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : 'no-ip';
once you know which one is returning real IP in ipv4 format add the following to your functions.php. Example with $_SERVER[‘X-FORWARDED-FOR’]
add_filter( 'geot/user_ip', function(){
return $_SERVER['X-FORWARDED-FOR'];
});
Thread Starter
Marius
(@mmichtus)
hi, thanks for your reply.
has something to do with cloudfalre.
even with: define('GEOT_CLOUDFLARE',true); is the same.
without cloudflare is no error.
thnaks
I have the exact same issue. Was this resplved yet, because I’d like to know what I need to do to get it working so I can decide if I want the premium version.
Plugin Author
Damian
(@timersys)
Hi @nwdlv, did you followed the instructions on my first message regarding to check what IP is being returned by your server?
Regards