20/04/2004, 17:33
|
| | | Fecha de Ingreso: febrero-2001
Mensajes: 350
Antigüedad: 23 años, 9 meses Puntos: 0 | |
Hola, este c+odigo te debería servir, lo uso mucho y me ha funcionado muy pero muy bien:
Salu2.
Código:
<?php
##############################################
# Inglés
if(strstr($HTTP_ACCEPT_LANGUAGE,"en-us")) {
Header("Location: http://www.mi.sitio.it");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"en")) {
Header("Location: http://www.mi.sitio.it");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"en-au")) {
Header("Location: http://www.mi.sitio.it");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"en-bz")) {
Header("Location: http://www.mi.sitio.it");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"en-ca")) {
Header("Location: http://www.mi.sitio.it");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"en-gb")) {
Header("Location: http://www.mi.sitio.it");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"en-ie")) {
Header("Location: http://www.mi.sitio.it");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"en-jm")) {
Header("Location: http://www.mi.sitio.it");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"en-nz")) {
Header("Location: http://www.mi.sitio.it");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"en-tt")) {
Header("Location: http://es.futurahost.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"en-za")) {
Header("Location: http://www.mi.sitio.it");
}
##############################################
# Portuguès - Portugal
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"pt")) {
Header("Location: http://www.mi.sitio.com.es");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"pt-br")) {
Header("Location: http://www.mi.sitio.com.es");
}
##############################################
# Italia - Italia Suiza
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"it")) {
Header("Location: http://www.mi.sitio.it");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"it-ch")) {
Header("Location: http://www.mi.sitio.it");
}
##############################################
# Cataluña
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"ca")) {
Header("Location: http://www.mi.sitio.ca");
}
##############################################
# Español (America Latina)
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-ar")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-bo")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-cl")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-co")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-cr")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-cd")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-ec")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-gt")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-hn")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-mx")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-ni")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-pa")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-pe")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-pr")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-py")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-sv")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-uy")) {
Header("Location: http://www.mi.sitio.com");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-ve")) {
Header("Location: http://www.mi.sitio.com");
##############################################
# Español (España)
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es")) {
Header("Location: http://www.mi.sitio.com.es");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"es-es")) {
Header("Location: http://www.mi.sitio.com.es");
##############################################
# Galicia
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"gl")) {
Header("Location: http://www.mi.sitio.com.es");
##############################################
# Gaelic (?)
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"gd")) {
Header("Location: http://www.mi.sitio.com.es");
##############################################
# Frances
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"fr")) {
Header("Location: http://www.mi.sitio.com.fr");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"fr-be")) {
Header("Location: http://www.mi.sitio.com.fr");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"fr-ca")) {
Header("Location: http://www.mi.sitio.com.fr");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"fr-ch")) {
Header("Location: http://www.mi.sitio.com.fr");
}
elseif(strstr($HTTP_ACCEPT_LANGUAGE,"fr-lu")) {
Header("Location: http://www.mi.sitio.com.fr");
##############################################
# Default (Italia)
}
else {Header("Location: http://www.mi.sitio.it");
}
?>
Última edición por BooMeranGz; 20/04/2004 a las 17:34 |