Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
How can I get this javascript added in my php

Microsoft says we can use the following javascript to detect Windows 11 (on the client side):

navigator.userAgentData.getHighEntropyValues(
   ["architecture", "model", "platform", "platformVersion", "uaFullVersion"])
      .then(ua => { console.log(ua) });

The response should be like: platformVersion: "14.0.0".

I need to use this as a variable in my PHP to detect if a user is using Windows 11:

if(is_browser_request()){   

$user_agent = $_SERVER['HTTP_USER_AGENT'];
$systemid = $_SERVER['HTTP_SEC_CH_UA_PLATFORM'];
$version = Unknown how to define

if (stripos($user_agent, "iPhone")!==false) {
    $brand = 'iPhone';
} else if ($version == "14.0.0") {
    $brand = 'Win11';
} else if ($version == "10.0.0") {
    $brand = 'Win10';

Does this make sense? How can I get the javascript added in my php and define the $version?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!