I want to identify user OS is a Debian or Redhat based using a PHP script and give users to download relevant packs (Debian - .deb, Redhat - .rpm). I used '$_SERVER['HTTP_USER_AGENT']' to get user OS type and following the results of 3 browsers (I checked this with Ubuntu)
Chrome
*Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36*
Opera
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 OPR/54.0.2952.51
Firefox
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0
As in the result, Firefox gives user os name (Ubuntu) and other 2 gives the only Linux. So I can't find user OS is a Debian or a Redhat in Chrome and Opera.
How can I find OS type in PHP? Is there any other way to fin OS type?
Any help is really appreciated, Thanks