Hi!
I am trying to redirect visitors to my page using your plugin.
I added this code in my default.htm file before the <!DOCTYPE html>
use Raccoon\GeoLocation\Facades\Geo;
function onStart() {
$geoLocation = Geo::getLocation($ipAddress);
if ($geoLocation->countryCode === 'UY') {
header('Location: https://www.elpais.com.uy/');
die();
}
}
but I get this error: "Undefined variable: ipAddress"
I am new at this, sorry if I am missing something obvious.