- This is a script designed to fit into your website and redirect/restrict access to visitors based on their country, or just to get the visitor`s country and country details, like population, currency and flag image path.
- The script should be included in a set of pages on your website so it could redirect visitors to those pages acordingly to the redirection rules.
- In this distribution is included a free IP2Country database (75% accurate) for 179 countries, with 16934 records.
- The country code of the visitors is saved in a cookie or a session variable in order to avoid searching the IP database repeatedly.
- With this script you can create as many "Redirection Nodes" as you want. On the same website, some pages could have different redirection rules than the others, by including them in different Redirection Nodes.
- For each Redirection Node, each country (or IP database) has a Redirection Rule (a link associated with it). If the visitor`s IP is in an IP database, he is redirected to the redirection link associated with it, or if this one is blank, to the default redirection link. If this default redirection link is blank too, the page is loaded. If the visitor`s country has no Redirection Rule specified, he is redirected to the default 'reject' link or if this one is blank, the page is loaded.
- It features an IP exception list, where you can place your trusted IPs, and a passwords/codes list for exceptions.
- The IP databases supported are MySql full, MySql split, Plain text full, Plain text split - all available at
http://rv.web-heaven.com . The Plain text databases can have both IP numbers (3240323434) and IP addresses (192.168.0.1).
- If you consider country IP databases just as "Redirection IP databases", you`ll be able to redirect/restrict access to your website based on a list of IP addresses, not necesarily from the same country. That`s why the script can also read IP databases with IP addresses (192.168.0.1), so you could easily create your custom IP database.
- It also creates an array with visitor`s country information, and the path to it`s flag GIF file, than you could use in your own scripts;