iPhone & iPod Detection


/ Published in: PHP



Copy this code and paste it in your HTML
  1. if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod'))
  2. {
  3. header('Location: http://yoursite.com/iphone');
  4. exit();
  5. }

URL: http://davidwalsh.name/detect-iphone

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.