note 52206 deleted from function.header by didou
| From: | didou@php.net | Date: | Thu, 16 Jun 2005 06:49:45 +0000 |
| Subject: | note 52206 deleted from function.header by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90506@lists.php.net to get a copy of this message | ||
Note Submitter: Oto "Zver" Brglez ml.
----
I have a page that should also be used for mobile devices. So i have hade some throubles. I wrote
this script for detection and redirection using header.
function Embended(){ /* Function for detection */
$out = false;
$STREZNIK = strtoupper($_SERVER['HTTP_USER_AGENT']);
if(eregi('NOKIA',$STREZNIK)) $out = true;
if(eregi('MOT',$STREZNIK)) $out = true;
if(eregi('SEC-',$STREZNIK)) $out = true;
if(eregi('PHONE',$STREZNIK)) $out = true;
if(eregi('PANASONIC',$STREZNIK)) $out = true;
if(eregi('SEC-',$STREZNIK)) $out = true;
if(eregi('PPC',$STREZNIK)) $out = true;
if(eregi('SIEMENS',$STREZNIK)) $out = true;
if(eregi('MITSU',$STREZNIK)) $out = true;
if(eregi('PORTALMMM',$STREZNIK)) $out = true;
if(eregi('BLACKBERRY',$STREZNIK)) $out = true;
if(eregi('SYMBIAN',$STREZNIK)) $out = true;
if(eregi('PHILIPS',$STREZNIK)) $out = true;
if(eregi('SENDO',$STREZNIK)) $out = true;
if(eregi('KLONDIKE',$STREZNIK)) $out = true;
if(eregi('SAGEM',$STREZNIK)) $out = true;
if(eregi('MOBILE',$STREZNIK)) $out = true;
if(eregi('ALCATEL',$STREZNIK)) $out = true;
if(eregi('SONY',$STREZNIK)) $out = true;
return $out;
};
/* Redirection with header to mobile page */
if(Embended()){ header("Location: zooxMobile.php"); };