Script link and more information https://github.com/serbanghita/Mobile-Detect
Note: If you get the following error:
Fatal error: Call to a member function isMobile() on a non-object.
Your $detect variable is out of scope. Add:
before your code in both files
include(“includes/Mobile_Detect.php”); global $detect; $detect = new Mobile_Detect;