Great! Those errors are gone. But I’m still not able to use the variables. I get an error when using this code:
$data = ip2location_get_vars();
$data = json_decode($data);
echo $data->countryCode;
Notice: Trying to get property 'countryCode' of non-object
or when I call anything from the $data object.
Also if I try to use a server variable I get this error:
Notice: Undefined index: IP2LOCATION_IP_ADDRESS
Again for any variable.