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.
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.
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:
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.