Important:
This support area is for Kalium 3 users only.
Support for Kalium 4 has moved to our new platform at support.laborator.co.
If you’re using Kalium 4, please create a new account there using your email and license key. A password will be sent to you automatically.
Hi,
I would like to use your script to block (redirect) all country to google.com or a web page… and only allow USA to access to my site. Can you please show me how to do that with your script.
Thank you so much for your help.
nyc02
Hi nyc02,
You can use this code:
include("../src/CountryDetector.class.php");
if ( CountryDetector::is( 'AMERICA' ) ) {
header( 'Location: http://www.google.com' );
exit;
}
However I suggest you to save a cookie cache and prevent the same users who access the site regularly, thus it will not increase the load time and also reach API limits.