Posted By

amandalaine on 06/23/11


Tagged

detection mobile device


Versions (?)

iPhone Detection


 / Published in: PHP
 

header line loads a new page into the browser

  1. if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod')) {
  2. header('Location: http://www.mywebsite.com');
  3. exit();
  4. }

Report this snippet  

You need to login to post a comment.