Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <?php
  2. $iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
  3. $android = strpos($_SERVER['HTTP_USER_AGENT'],"Android");
  4. $palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS");
  5. $berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
  6. $ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod");
  7.  
  8. if ($iphone || $android || $palmpre || $ipod || $berry == true) {
  9. header("Location: http://YOUR-SUBDOMAIN");
  10. exit();
  11. }
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement