Don't like ads? PRO users don't see any ads ;-)
Guest

ad

By: a guest on Jun 22nd, 2012  |  syntax: PHP  |  size: 0.55 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. $IP = $_SERVER["REMOTE_ADDR"];
  4.  
  5. include("geo/geoip.inc");
  6.  
  7. $gi = geoip_open("geo/GeoIP.dat", GEOIP_MEMORY_CACHE);
  8.  
  9. $CountryCode = geoip_country_code_by_addr($gi, $IP);
  10. geoip_close($gi);
  11.  
  12. // ****NO TOCAR POR ENCIMA DE ESTA LINEA****
  13.  
  14. if ($CountryCode=="ES"){
  15. ?>
  16.  
  17. //<?php header('Location: http://track.adjal.com/aff_c?offer_id=1748&aff_id=6500'); ?>
  18.  
  19. <?php
  20. }
  21. ?>
  22.  
  23.  
  24.                                 <?
  25.                                 else if($CountryCode=="MX"){
  26.                                 ?>
  27.  
  28.                                 //<?php header('Location: http://track.adjal.com/aff_c?offer_id=1243&aff_id=6500'); ?>
  29.  
  30.                                 <?php
  31.                                 }
  32.                                 ?>