S
S
skyfly20102015-12-17 22:49:03
PHP
skyfly2010, 2015-12-17 22:49:03

How to determine if a person has entered the site from a mobile device or from a PC using PHP?

I remember there was a simple and convenient script in PHP, which made it possible to determine whether a person came to the site from a mobile device. Prompt, good scripts. It would be wonderful if the type of mobile platform (bucket, iPhone or Windows) was also determined.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Y
Yakov Vylegzhanin, 2015-12-18
@skyfly2010

Compare $_SERVER['HTTP_USER_AGENT'].

O
OnYourLips, 2015-12-17
@OnYourLips

It is pointless.
Because now many devices on mobile OS have a larger screen and more powerful.
It is necessary to check the possibilities, and only on JS.
Even from jQuery sawed out such functionality.

J
javanub, 2015-12-17
@javanub

Google analytics

V
Vladislav, 2015-12-17
@MrBikus

For example https://packagist.org/packages/mobiledetect/mobile...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question