title: How to detect if Browser is (not) iPhone, iPad or iPod in PHP?
body: <p>I want to run some code if the user is not using an apple mobile device browser (iphone, ipad or ipod).</p>
  
  <p>I tried the following but I have no idea if it works: </p>
  
  <pre><code>&lt;?php
  if(!strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || !strstr($_SERVER['HTTP_USER_AGENT'],'iPod') || !strstr($_SERVER['HTTP_USER_AGENT'],'iPad')) 
  {
       // user is not on an iPhone, iPad, or iPod device so execute code
  }
  ?&gt;
  </code></pre>