zayd, it's not actually that bad, the real magic happens on this line:
PHP:
$cn= geoip_country_name_by_addr($geofile, $_SERVER['REMOTE_ADDR']);
Bascially, that line starts off with declaring a variable to store the country corresponding with the IP. The junk after the equal sign is a function that takes the database file and the ip address and works its
magic by returning the country that corresponds with the IP Addy.
PHP:
switch ($cn) {
case "United Kingdom": {
header("Location: http://www.wickedfire.com/"); /* Redirect to whatever */
break;
}
This is where more magic happens, basically, once you have the country stored in the variable $cn it's a matter of acting on what that country actually is the switch statement basically compares the variable inside the () to the various case states and if they match it executes what's between the {}, i.e. in the above example, if $cn contains United Kingdom then it will preform a php redirect to the right website.
So all and all, the only thing you really have to do to add more countries is make sure the name of the country you want is in the database and then you add another case statement i.e.
PHP:
case "Mexico": {
header("Location: http://www.mexico-travel.com/"); /* Redirect */
break;
}
Hopefully it makes a little more sense, if you have more php related questions, feel free to ask here, or pm me or whatever.