Andrew McCombe

Full Stack Web Developer

Detect iPad and iPhone with PHP

If you ever have the need to detect iPad and iPhone with PHP, or any other mobile/tablet device, you can use the excellent php-mobile-detect library available at Example usage:

If you want to detect mobile devices but not tablets you can use the following code snippet: