Class that lookup’s for a country code then it redirects (include files, or callbacks) the user to desired content you want. The function of this class is like Google that redirects users from countries that support google e.g. in UK when you enter google.com you will be redirected to google.co.uk and this is exactly what you can do with CountryDetector
This class is builded in static context for purpose of best usage. Also it is very easy to implement
Country Detect & Redirect is a lightweight yet powerful PHP class designed to detect the user’s country based on their IP address and redirect them to country-specific content or URLs. Its primary purpose is to personalize user experience and deliver localized content by automatically redirecting users to the appropriate domain, subdomain, or file based on their geographic location—similar to how Google redirects visitors (e.g., from google.com to google.co.uk when accessed from the United Kingdom).
This class is built with simplicity and flexibility in mind. Written using a static context, it allows developers to integrate it easily into any PHP-based web application without the need for instantiating objects. Developers can define country-specific redirection rules through include files, callbacks, or direct URL mappings, enabling full control over what content or functionality users receive based on their country.
Country detection by IP using reliable lookup sources (local or API-based)
Static class design for ease of use and minimal integration effort
Custom redirection rules using callbacks, includes, or direct headers
Easy configuration for mapping country codes to destinations
Extendable logic for use in multi-language websites, geo-blocking, or content segmentation
21 Apr 2025, 10:38 AM
21 Apr 2025, 10:38 AM
1. All digital products are the most recent version, with no possibility of free updates. After payment, you can request an update to the most recent version for 5 days if a new version is released. We free support within 5 days.
2. If a license is required (Excludes WHMCS license , we provide only method not license), please contact us via email or ticket for assistance with activation. Our license is only valid for activation and does not include support.
3. We provide Mobile, PHP script installation services for $19.90 / ₹1700. Please create a backup after installation as we do not support re-installation. For mobile app source code, we do not offer installation services.
4. If you have any questions, please contact us by email [email protected] or create a ticket on this page
5. Please note that any digital products presented on the website do not contain malicious code, viruses or advertising. You will receive the original files from the developers. We do not sell any products that have been downloaded from other websites.
6. The response time can last up to 6 hours.