Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

Auto Redirect to wap, wap2, or imode When Using Mobilephone

Aloittaja tooman, kesäkuu 29, 2009, 08:04:17 IP

« edellinen - seuraava »

N3RVE

I don't see how attaching the file is a problem.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Lainaa"Somewhere, something incredible is waiting to be known." - Carl Sagan

projectnaija

n3rve am having a similar issue on my site i want autoRedirect to wap2 for operamini users and not to force operamini to wap2

Illori

please do not bump old topics and please use a separate topic for each issue, this topic belongs to someone else.

projectnaija

here is the code to replace in you index.php


if (isset($_REQUEST['nowap']))
   $_SESSION['nowap'] = true;
elseif (!isset($_SESSION['nowap']))
{
   if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false)
      $_REQUEST['wap2'] = 1;
   elseif (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false)
   {
      if (strpos($_SERVER['HTTP_USER_AGENT'], 'DoCoMo/') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'portalmmm/') !== false)
         $_REQUEST['imode'] = 1;
      else
         $_REQUEST['wap'] = 1;
   }
   elseif(preg_match('/Opera Mini/i',$_SERVER['HTTP_USER_AGENT']))
                               $_REQUEST['wap2'] = 1;
}

Advertisement: