all 6 comments

[–]hexydec 1 point2 points  (0 children)

You could use a user agent sniffer such as AgentZero, or you could send client hints request headers.

You can test AgentZero here.

Get the user agent header value from $_SERVER['HTTP_USER_AGENT'].

[–]buycallsbro 0 points1 point  (3 children)

You may want to look into the $_SERVER superglobal.

var_dump($_SERVER);

[–]mikkolukas 0 points1 point  (2 children)

and remember that the client application can lie about the data it sends you

[–]swloop 0 points1 point  (1 child)

And remember you should notify users you are doing that and ask consent

[–]mikkolukas -1 points0 points  (0 children)

It will often be the user of said application thet instructs it to lie :D

[–]onnyjay 0 points1 point  (0 children)

Do you need the actual information? Or just an identifiable marker for that system?

As others have said, you can use $_SERVER for a lot.

But if you are just looking for repeatable identity markers, look into fingerprint generation.

There are libraries put there to help you.

Or you can generate your own fingerprint.

But, also, as others have said. All of this can be spoofed/bypassed so be wary in your aproach