Installation * upload all .php files and folder "data" to server * Create MySQL database * modify $dbhost,$dbname,$dbuser,$dbpass in common.php (so script will use $dbname for tables) * visit http://www.maxmind.com/app/geolitecity * click on "Download the latest GeoLite City CSV Format" * unzip downloaded zip file * upload GeoLiteCity-Blocks.csv,GeoLiteCity-Location.csv to same folder as .php files * Rename geotargeterpro subfolder to some other name (for security) * run script import.php (type in browser http://yoursite.com/subfolder-name/import.php) (it may take upto 30 minutes, script must finish work with message blocks:XXX records imported locations:XXX records imported") IF you get error try to run this script from SSH, as "php import.php" * Wait 10 minutes after Step 3 completes * Delete the import.php file on the server Usage User visit your redirection script (review example.php) This .php script must have next line include "common.php"; After it you may put redirects as redirectUrl(url) " just redirect user to url without any checks Examples: // default redirectUrl("http://google.com"); redirectState(url,state) " check USA states Examples: //if user from NY redirectState("http://nytimes.com","NY"); //if user from NY or CA redirectState("http://nytimes.com",array("NY","CA")); redirectCountry(url,countryCode) " check countries Examples: //if user from USA redirectCountry("http://yahoo.com","US"); //if user from France Or Finland redirectCountry("http://yahoo.com.fr",array("FR","FI")); ADVANCED USAGE redirectCase(url,caseFile) " use text file from folder "data" caseFile " is filename without ".txt" Examples: // Paypal Accredited Countries redirectCase("http://paypal.com","8"); NOTE: You may create new text files in folder "data" Run update_data.php after editing text files script will add necessary country/state codes)