Check for mobile device?

There is a code. How to add validation on mobile?

<?php if (!isset($_SERVER['HTTP_USER_AGENT']) || stripos($_SERVER['HTTP_USER_AGENT'], 'Chrome-Lighthouse') === false): ?>
 // the content
<?php endif; ?>
March 19th 20 at 08:23
1 answer

Find more questions by tags PHP