Posted By

DADU on 12/23/10


Tagged

php iphone android ipod touch iPad webOS


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

alyssonweb


Detect touch


 / Published in: PHP
 

  1. function istouch() {
  2.  
  3. if(preg_match('~iPad|iPhone|iPod|Android|webOS~',$_SERVER['HTTP_USER_AGENT'])) return true;
  4. else return false;
  5. }

Report this snippet  

You need to login to post a comment.