iPhone Detection

/ Published in: PHP
Save to your folder(s)

header line loads a new page into the browser

Copy this code and paste it in your HTML
  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


RSS Icon Subscribe to comments

You need to login to post a comment.