{"id":5741,"date":"2025-02-27T07:30:05","date_gmt":"2025-02-27T07:30:05","guid":{"rendered":"https:\/\/s-o-s.net\/product\/country-detect-redirect\/"},"modified":"2025-04-17T18:58:30","modified_gmt":"2025-04-17T18:58:30","slug":"country-detect-redirect","status":"publish","type":"product","link":"https:\/\/s-o-s.net\/en_gb\/product\/country-detect-redirect\/","title":{"rendered":"Country Detect &#038; Redirect"},"content":{"rendered":"<p><br \/>\n<br \/>\n<a class=\"wp_automatic_demo_btn\" target=\"_blank\" href=\"\" rel=\"noopener\">LIVE PREVIEW<\/a> <a class=\"wp_automatic_buy_btn broken_link\" target=\"_blank\" href=\"https:\/\/codecanyon.net\/item\/country-detect-redirect\/89383\" rel=\"noopener\">LIVE ORDER $26<\/a><br \/>\n<br \/>\n<img decoding=\"async\" src=\"https:\/\/previews.customer.envatousercontent.com\/files\/51065447\/countryredirect.png\"><br \/>\n<a><span style=\"font-size: 20px\">Country Detect &#038; Redirect<\/span><\/a><br \/>\n<img decoding=\"async\" src=\"https:\/\/s3.envato.com\/files\/310837476\/themeforest-profile%20copy.jpg\" width=\"25\" height=\"25\"> <a href=\"https:\/\/codecanyon.net\/user\/Laborator\" target=\"_blank\" rel=\"noopener\">Laborator<\/a><br \/>\n<\/p>\n<p>\nClass that lookup&#8217;s for a country code then it redirects (include files, or callbacks) the user to desired content you want.<br \/>\nThe function of this class is like Google that redirects users from countries that support google<br \/>\ne.g. in UK when you enter google.com you will be redirected to google.co.uk and this is exactly<br \/>\nwhat you can do with CountryDetector<\/p>\n<p>This class is builded in static context for purpose of best usage. Also it is very easy to implement<\/p>\n<h2 id=\"item-description__update-21-nov-2012\">Update: 21 Nov, 2012<\/h2>\n<p>We present you two new functions to simplify the work of handling country codes. These functions are:<\/p>\n<pre>CountryDetect::getCountryCode();<\/pre>\n<p>It returns the current country code of user in two (or three sometimes) uppercase initials.<\/p>\n<p>\nThe second CountryDetect function is &#8220;<strong>is($country_code)<\/strong>&#8221;, so you can easily check if its a specified country code in order to take an action.<\/p>\n<pre>CountryDetect::is($country_code);<\/pre>\n<p>It returns true or false, based on the condition of specified country code, which is case iNsEnSiTiVe.<\/p>\n<p>\nExamples about usage of these functions are located on <strong>examples\/7_get_country_code.php<\/strong>.<\/p>\n<p><\/p>\n<h2 id=\"item-description__updated\">Updated<\/h2>\n<p>There is added another function called<\/p>\n<p><b>includeFileOnce<\/b><\/p>\n<p>for purposes when you want to include just once a file, and ignore other below declaration lines<\/p>\n<h2 id=\"item-description__features\">Features<\/h2>\n<ul>\n<li>Country detect then redirect<\/li>\n<li>Country detect then include a specific file<\/li>\n<li>Country detect then call a function defined by you (callback)<\/li>\n<\/ul>\n<p><a target=\"_blank\" href=\"https:\/\/themeforest.net\/item\/kalium-creative-theme-for-professionals\/10860525?utm_source=themeforest&amp;utm_medium=item_desc&amp;utm_campaign=lab-cc-plugins&amp;utm_id=envato_sale\" rel=\"noopener\" class=\"broken_link\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/kaliumtheme.com\/images\/item-page\/check-kalium.jpg\" alt=\"Try Kalium WordPress Theme\" \/><\/a><\/p>\n<p>\n<br \/>\n<br \/>\n<a href=\"https:\/\/codecanyon.net\/item\/country-detect-redirect\/89383\" target=\"_blank\" rel=\"noopener\" class=\"broken_link\">Source link<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>LIVE PREVIEW LIVE ORDER $26 Country Detect &#038; Redirect Laborator Class that lookup&#8217;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 [&hellip;]<\/p>","protected":false},"featured_media":5742,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"give_campaign_id":0},"product_brand":[],"product_cat":[3344,3331,3329],"product_tag":[3829,3830,3831],"class_list":{"0":"post-5741","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-navigation-php-script","7":"product_cat-php-script-solution","8":"product_cat-pro-version","9":"product_tag-country","10":"product_tag-detect","11":"product_tag-redirect","13":"first","14":"instock","15":"shipping-taxable","16":"purchasable","17":"product-type-simple","18":"add-to-wishlist-after_add_to_cart"},"acf":[],"fifu_image_url":"https:\/\/previews.customer.envatousercontent.com\/files\/51065447\/countryredirect.png","_links":{"self":[{"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/product\/5741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/types\/product"}],"replies":[{"embeddable":true,"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/comments?post=5741"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/media\/5742"}],"wp:attachment":[{"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/media?parent=5741"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/product_brand?post=5741"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/product_cat?post=5741"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/product_tag?post=5741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}