Hi Everybody,
I have developed a website using PHP, which will produce HTML code.
But I have some pages in PHP ,which will produce WML code for mobile browsers.
I want to redirect to WML page,if the site is accessed from the mobile. Otherwise it should display HTML page if the site is accessed from Desktop PC.
Please do reply me.
Arun.
this is the script....this is s php type...
<?php
/////////////////////////////////////////////////////////////////////////////
///************************************************** ****************///////
///*PROYECTO WAP CONSULTA DE NOTAS-CORPORACION UNIVERSITARIA DE CIENCIA*////
///*Y DESARROLLO UNICIENCIA-EXTENSION BUCARAMANGA.*********************////
///*TESIS PRESENTADA POR: JOSE ALVAREZ VERGARA-INGENIERIA INFORMATICA*////
///************************************************** ******************//
////////////////////////////////////////////////////////////////////////
//PROTECCION DE NAVEGADOR
$user = explode ('/', $HTTP_USER_AGENT);
//EL ACCESO ESTA DENEGADO PARA CUALQUIERA DE ESTOS NAVEGADORES Y SERA REDIRECCIONADO A LA PAGINA PRINCIPAL DE LA U
if($user[0]=="Opera"||$user[0]=="Mozilla"||$user[0]=="Go!Zilla"||$user[0]=="Netscape"||$user[0]=="MSIE"){
//PAGINA COMPATIBLE A LA CUAL SE REDIRECCIONA
header ('Location: http://www.unicienciabga.edu.co/wap/error.php');}
//EN CASO QUE SEA UN NAVEGADOR WAP COMPATIBLE SE PERMITIRÁ EL ACCESO
include("parametros.inc");
?>
<wml>
<card ontimer='inicio.wml#main' title='<? echo $SITENAME; ?>'>
<timer value="50"/>
<p align='center'>
<small> SISTEMA WAP<br/>
<strong>Uniciencia Bucaramanga</strong></small><br/>
<img src="./images/uniciencia.jpg" alt="Uniciencia"/><br/>
<small>Educacion Integral de Optima Calidad</small><br/>
<small><a href='inicio.wml#main'>Ingresar</a></small>
</p>
</card>
</wml>