Hi There, I’m not a techie but I’m wanting to use a company called Ezoic to handle my adsense accounts. I’m using siteground and they have a captcha blocker set up that I need to forward the real IP’s through to Siteground.
this link is the The Ezoic support article that I was referred to.
Ultimately I was told to add the code below to my wp-config file:
// Use X-Forwarded-For HTTP Header to Get Visitor’s Real IP Address
if ( isset( $_SERVER[‘HTTP_X_FORWARDED_FOR’] ) ) {
$http_x_headers = explode( ‘,’, $_SERVER[‘HTTP_X_FORWARDED_FOR’] );
$_SERVER[‘REMOTE_ADDR’] = $http_x_headers[0];
}
my questions are the following:
- should I add this to the wp-config.php file
1a) if not, do i add this to the functions.php file in x theme?
1b) if 1a is yes, how do i do this? - is there another option?
thanks for your help