Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/05/2015, 19:52
Avatar de carscx
carscx
 
Fecha de Ingreso: noviembre-2008
Mensajes: 227
Antigüedad: 15 años, 5 meses
Puntos: 10
Respuesta: Opcion de Usuario Movil ver sitio completo

podrias poner un enlace al sitio completo, con un parametro en la url, del tipo http://www.sitiocompleto.com?full=yes

Y luego en ese mismo codigo, hacer algo asi:

Código PHP:
Ver original
  1. <?php
  2. $iphone = strpos($_SERVER[&#8216;HTTP_USER_AGENT’],”iPhone”);
  3. $android = strpos($_SERVER[&#8216;HTTP_USER_AGENT’],”Android”);
  4. $palmpre = strpos($_SERVER[&#8216;HTTP_USER_AGENT’],”webOS”);
  5. $berry = strpos($_SERVER[&#8216;HTTP_USER_AGENT’],”BlackBerry”);
  6. $ipod = strpos($_SERVER[&#8216;HTTP_USER_AGENT’],”iPod”);
  7.  
  8. $full = $_GET['full'];
  9.  
  10. if ($iphone || $android || $palmpre || $ipod || $berry == true || full != "yes")
  11. {
  12. header(&#8216;Location: http://aquivalaurldetusitiowebmobile.com/’);
  13. //OR
  14. echo "<script>window.location=’http://aquivalaurldetusitiowebmobile.com'</script>";
  15. }else{
  16. header(&#8216;Location: http://sitiocompleto.com?full=yes/’);
  17. //OR
  18. echo "<script>window.location='http://sitiocompleto.com?full=yes'</script>";
  19. }
  20. ?>

Espero te sirva. Saludos,
__________________
Frontend Developer
JS+HTML5+CSS3
Backend Developer
PHP+MySQL