Back to Browse

How to Detect Mobile/Tablet Device in PHP | Server - Http user agent

7.7K views
Oct 24, 2020
7:25

How to Detect Mobile/Tablet Device in PHP | Server - Http user agent In this video, you will learn how you can detect mobile, tablet and browser in php using http user agent You can check mobile and android string $devicecheck= is_numeric(strpos(strtolower($_SERVER['HTTP_USER_AGENT']),"mobile")); $devicecheck_android= is_numeric(strpos(strtolower($_SERVER['HTTP_USER_AGENT']),"android")); if($devicecheck==1 OR $devicecheck_android==1) { echo 'You are using a mobile device'; } else{ echo 'You are using a browser'; } you can detect mobile device using this code in php Also, you can detect tablet using this code in php #html5 #knowledgethrusters

Download

0 formats

No download links available.

How to Detect Mobile/Tablet Device in PHP | Server - Http user agent | NatokHD