How can I know whether the user surfing my website is surfing via a mobile device or a PC??
I thought about:

$_SERVER['HTTP_USER_AGENT'];

However, I think that there is a variety of names of mobile browsers.. How could I solve it??
Thanks beforehand.

Thanks a lot. I'll try it, God willing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.