Laborator supports this item


This author's response time can be up to 2 business days.

Popular questions for this item

How to redirect an entire continent?

That’s say you want to redirect users from America to a specified URL.

CountryDetector::redirect("america", "http://myurl");

but you want to exclude Mexicans, here is the part of code

CountryDetector::redirect("america", "http://myurl", "MX");

As a third parameter is array of countries that will not affected on redirect, and MX is country code for Mexico.

How to call back a function?

First you must define functions that will be used on callbacks example:

function unitedStates()
 echo "Callback for United States of America";

then you can add function name on callback() function as on given example:

CountryDetector::callback("US", "unitedStates");

How to include file?

The usage of function is the same as on redirect() or callback() the only things that changes is second parameter, in this case name of method tells us for file to include. That’s see how:

CountryDetector::includeFile(array("US", "DE"), "my_special_file.php");

In first parameter we send an array. You are allowed to send whether array or string, it’s on yours, but with array you can include specific countries that you may need to do separate actions.

Showed in examples are United States and Germany.

Contact the author

This author will respond to buyers' questions and provides limited support through their own support system.

Item support includes:

  • Availability of the author to answer questions
  • Answering technical questions about item’s features
  • Assistance with reported bugs and issues
  • Help with included 3rd party assets

However, item support does not include:

  • Customization services
  • Installation services

View the item support policy