G
gowkster
Delta
Hola, estoy intentando hace una campaña en ADJAL y me he liado con el PHP de la geolocalización, el caso es que dreamweaver me da un error que no soy capaz de localizar.. y el la web me salen todas las campañas en lugar de salirme una con la geolocalización correcta, supongo que me he dejado algun parentesis por cerrar o algo así, pero no soy capaz de encontrarlo.. me hechais una mano??
PHP:
<?php
$IP = $_SERVER["REMOTE_ADDR"];
include("geo/geoip.inc");
$gi = geoip_open("geo/GeoIP.dat", GEOIP_MEMORY_CACHE);
$CountryCode = geoip_country_code_by_addr($gi, $IP);
geoip_close($gi);
// ****NO TOCAR POR ENCIMA DE ESTA LINEA****
if ($CountryCode=="ES"){
?>
<a href="http://track.adjal.com/aff_c?offer_id=2528&aff_id=19398&file_id=173602" target="_blank"><img src="http://media.adjal.com/brand/files/adjal/2528/Viaje_ES_3B_300x250.gif" width="300" height="250" border="0" /></a><img src="http://track.adjal.com/aff_i?offer_id=2528&aff_id=19398&file_id=173602" width="1" height="1" />
<?php
}
?>
<?
else if($CountryCode=="IT"){
?>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" width="300" height="250">
<param name="movie" value="http://media.adjal.com/brand/files/adjal/2808/Gratta_IT_300x250.swf" />
<param name="quality" value="high" />
<param name="flashvars" value="&clickTag=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D2808%26aff_id%3D19398%26file_id%3D198796&clickTAG=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D2808%26aff_id%3D19398%26file_id%3D198796" />
<embed src="http://media.go2speed.org/brand/files/adjal/2808/Gratta_IT_300x250.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="250" flashvars="&clickTag=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D2808%26aff_id%3D19398%26file_id%3D198796&clickTAG=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D2808%26aff_id%3D19398%26file_id%3D198796"></embed></object><img src="http://track.adjal.com/aff_i?offer_id=2808&aff_id=19398&file_id=198796" width="1" height="1" />
<?php
}
?>
<?
else if($CountryCode=="CO"){
?>
<a href="http://track.adjal.com/aff_c?offer_id=1476&aff_id=19398&file_id=164567" target="_blank"><img src="http://media.adjal.com/brand/files/adjal/1476/conquistawi5_1_300x250.gif" width="300" height="250" border="0" /></a><img src="http://track.adjal.com/aff_i?offer_id=1476&aff_id=19398&file_id=164567" width="1" height="1" />
<?php
}
?>
<?
else if($CountryCode=="PA"){
?>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" width="300" height="250">
<param name="movie" value="http://media.adjal.com/brand/files/adjal/814/Facebook_300x250.swf" />
<param name="quality" value="high" />
<param name="flashvars" value="&clickTag=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D814%26aff_id%3D19398%26file_id%3D130340&clickTAG=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D814%26aff_id%3D19398%26file_id%3D130340" />
<embed src="http://media.go2speed.org/brand/files/adjal/814/Facebook_300x250.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="250" flashvars="&clickTag=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D814%26aff_id%3D19398%26file_id%3D130340&clickTAG=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D814%26aff_id%3D19398%26file_id%3D130340"></embed></object><img src="http://track.adjal.com/aff_i?offer_id=814&aff_id=19398&file_id=130340" width="1" height="1" />
<?php
}
?>
<?
else if($CountryCode=="EC"){
?>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" width="300" height="250">
<param name="movie" value="http://media.adjal.com/brand/files/adjal/816/Facebook_300x250.swf" />
<param name="quality" value="high" />
<param name="flashvars" value="&clickTag=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D816%26aff_id%3D19398%26file_id%3D130338&clickTAG=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D816%26aff_id%3D19398%26file_id%3D130338" />
<embed src="http://media.go2speed.org/brand/files/adjal/816/Facebook_300x250.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="250" flashvars="&clickTag=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D816%26aff_id%3D19398%26file_id%3D130338&clickTAG=http%3A%2F%2Ftrack.adjal.com%2Faff_c%3Foffer_id%3D816%26aff_id%3D19398%26file_id%3D130338"></embed></object><img src="http://track.adjal.com/aff_i?offer_id=816&aff_id=19398&file_id=130338" width="1" height="1" />
<?php
}
?>
<?
else if($CountryCode=="US"){
?>
<a href="http://track.adjal.com/aff_c?offer_id=1126&aff_id=19398&file_id=174994" target="_blank"><img src="http://media.adjal.com/brand/files/adjal/1126/Banner_WEB_Tuning-3D-Racing-Plus_Binbit_EN_300x250.jpg" width="300" height="250" border="0" /></a><img src="http://track.adjal.com/aff_i?offer_id=1126&aff_id=19398&file_id=174994" width="1" height="1" />
<?php
}
?>
<?
else if($CountryCode=="SP"){
?>
<a href="http://track.adjal.com/aff_c?offer_id=1126&aff_id=19398&file_id=174994" target="_blank"><img src="http://media.adjal.com/brand/files/adjal/1126/Banner_WEB_Tuning-3D-Racing-Plus_Binbit_EN_300x250.jpg" width="300" height="250" border="0" /></a><img src="http://track.adjal.com/aff_i?offer_id=1126&aff_id=19398&file_id=174994" width="1" height="1" />
<?php
}
?>
<?
else if($CountryCode=="AR"){
?>
<a href="http://track.adjal.com/aff_c?offer_id=1278&aff_id=19398&file_id=215994" target="_blank"><img src="http://media.adjal.com/brand/files/adjal/1278/New_Apple_Prize_ES_AR_300x250.gif" width="300" height="250" border="0" /></a><img src="http://track.adjal.com/aff_i?offer_id=1278&aff_id=19398&file_id=215994" width="1" height="1" />
<?php
}
?>
<?php
else {
?>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6851324750609619";
/* Facebook login barra lateral grande 1 */
google_ad_slot = "3110743234";
google_ad_width = 250;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php
}
?>