Posted By

kbrown on 05/04/12


Tagged


Versions (?)

if not on iPhone


 / Published in: PHP
 

  1. <?php
  2. $iphone = (bool) strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
  3. $ipad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPad');
  4. $android = (bool) strpos($_SERVER['HTTP_USER_AGENT'],"Android");
  5. $webos = (bool) strpos($_SERVER['HTTP_USER_AGENT'],"WebOS");
  6. ?>
  7.  
  8. <?php if ( !$iphone && !$android && $webos ) { ?>
  9.  
  10. ///// if not on ipad
  11.  
  12. <?php $ipad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPad'); if ( !$ipad ) { ?>
  13. /*CONTENT*/
  14. <?php } ?>

Report this snippet  

You need to login to post a comment.