title: How to detect Android phone using php?
body: <p>If a user surfs to my site I want to display a message if he using Android phone. My website is <code>http://website.com</code></p>
  
  <p>How can I do this?</p>
  
  <p>I have tried this but not succeeded:</p>
  
  <pre><code>var ua = navigator.userAgent.toLowerCase();
  var isAndroid = ua.indexOf("android") &gt; -1; //&amp;&amp; ua.indexOf("mobile");
  if(isAndroid) {
      // Do something!
      // Redirect to Android-site?
      window.location = 'http://android.davidwalsh.name';
  }
  </code></pre>