Find Jobs
Hire Freelancers

PHP Operating system detection

$10-12 USD

Imefungwa
Imechapishwa over 2 years ago

$10-12 USD

Kulipwa wakati wa kufikishwa
this code is working good but only show the Operating system name but i need make like i don't know where the problem. <?php function get_operating_system() { $u_agent = $_SERVER['HTTP_USER_AGENT']; $operating_system = 'Unknown Operating System'; //Get the operating_system name if (preg_match('/linux/i', $u_agent)) { $operating_system = 'Linux'; } elseif (preg_match('/macintosh|mac os x|mac_powerpc/i', $u_agent)) { $operating_system = 'Mac'; } elseif (preg_match('/windows|win32|win98|win95|win16/i', $u_agent)) { $operating_system = 'Windows'; } elseif (preg_match('/ubuntu/i', $u_agent)) { $operating_system = 'Ubuntu'; } elseif (preg_match('/iphone/i', $u_agent)) { $operating_system = 'IPhone'; } elseif (preg_match('/ipod/i', $u_agent)) { $operating_system = 'IPod'; } elseif (preg_match('/ipad/i', $u_agent)) { $operating_system = 'IPad'; } elseif (preg_match('/android/i', $u_agent)) { $operating_system = 'Android'; } elseif (preg_match('/blackberry/i', $u_agent)) { $operating_system = 'Blackberry'; } elseif (preg_match('/webos/i', $u_agent)) { $operating_system = 'Mobile'; } return $operating_system; } ?> <?php if ($user_agent == "Windows") { ?> show html code <?php } ?> <?php if ($user_agent == "Mac") { ?> show html code <?php } ?>
Kitambulisho cha mradi: 31560021

Kuhusu mradi

14 mapendekezo
Mradi wa mbali
Inatumika 2 yrs ago

Unatafuta kupata pesa?

Faida za kutoa zabuni kwenye Freelancer

Weka bajeti yako na muda uliopangwa
Pata malipo kwa kazi yako
Eleza pendekezo lako
Ni bure kujiandikisha na kutoa zabuni kwa kazi
14 wafanyakazi huru wana zabuni kwa wastani $13 USD kwa kazi hii
Picha ya Mtumiaji
Hi, I have checked the code and can see the problem, will solve it right now, thanks..............................
$11 USD ndani ya siku 1
4.9 (462 hakiki)
6.8
6.8
Picha ya Mtumiaji
-------------- Nice to meet you. I'm Sergey. -------------- I'm php expert. Please chat me. I can solve your your problems.
$11 USD ndani ya siku 7
5.0 (6 hakiki)
3.1
3.1
Picha ya Mtumiaji
Bug fixed use following code <?php function get_operating_system() { $u_agent = $_SERVER['HTTP_USER_AGENT']; $operating_system = 'Unknown Operating System'; //Get the operating_system name if (preg_match('/linux/i', $u_agent)) { $operating_system = 'Linux'; } elseif (preg_match('/macintosh|mac os x|mac_powerpc/i', $u_agent)) { $operating_system = 'Mac'; } elseif (preg_match('/windows|win32|win98|win95|win16/i', $u_agent)) { $operating_system = 'Windows'; } elseif (preg_match('/ubuntu/i', $u_agent)) { $operating_system = 'Ubuntu'; } elseif (preg_match('/iphone/i', $u_agent)) { $operating_system = 'IPhone'; } elseif (preg_match('/ipod/i', $u_agent)) { $operating_system = 'IPod'; } elseif (preg_match('/ipad/i', $u_agent)) { $operating_system = 'IPad'; } elseif (preg_match('/android/i', $u_agent)) { $operating_system = 'Android'; } elseif (preg_match('/blackberry/i', $u_agent)) { $operating_system = 'Blackberry'; } elseif (preg_match('/webos/i', $u_agent)) { $operating_system = 'Mobile'; } return $operating_system; } $os=get_operating_system(); ?> <?php if ($os == "Windows") { ?> show html code Windows <?php } ?> <?php if ($os == "Mac") { ?> show html code Mac <?php } ?>
$11 USD ndani ya siku 7
5.0 (2 hakiki)
2.7
2.7
Picha ya Mtumiaji
I have more than 5 years of experience working with PHP, MySQL, API, HTML, Javascript, Node Js, Vue Js, Css, Git, C#, SQL Server, Devexpress, and integrating online payment gateways, Paypal, Payer, PerfectMoney, ... .I help you complete the task as fast as possible. $user_agent = get_operating_system(); echo $user_agent;
$10 USD ndani ya siku 1
5.0 (2 hakiki)
1.3
1.3
Picha ya Mtumiaji
Dear client, Thanks for your job posting and hope you and your family would be stayed healthy and safe from pandemic during these uncertain times. The PHP code shows only what system is, so what do you want else? If you are looking for a correct result, I will be able to be good candidate and you will be satisfied about my work. I can start immediately. Looking forward to your response. Warm regards,
$11 USD ndani ya siku 7
5.0 (2 hakiki)
1.3
1.3
Picha ya Mtumiaji
I am Ring. I am about 19+ years experienced in GNU/Linux based system, server installation and customization, develop, deploy, security and support. I may help you in this regard.
$15 USD ndani ya siku 1
3.5 (2 hakiki)
1.3
1.3
Picha ya Mtumiaji
Hi, It is easy,I can do on time.I work online, where you can track progress of your project.I have 6 years of experience in development(websites,web applications,mobile apps, desktop applications,UI/UX), using PHP, WordPress, Java, Python, JavaScript, ReactJs, Bootstrap, I can start now, please come to chat, to discuss more.
$11 USD ndani ya siku 2
5.0 (2 hakiki)
0.6
0.6
Picha ya Mtumiaji
Hi there! I am Atif, a full stack PHP developer. I'm certain I can do this job perfectly. I have 9+ years of experience in HTML, CSS, Bootstrap, Grid, Flex, Material UI, PHP, Laravel, Javascript, React.js, Vue.js, Node.js, Redux, Typescript, Firebase, AWS. Would love to discuss this further with you. Thanks
$11 USD ndani ya siku 7
0.0 (0 hakiki)
0.0
0.0
Picha ya Mtumiaji
I think I know your problem is on something like function calling problem. In here we need to literally call that first.
$11 USD ndani ya siku 1
0.0 (0 hakiki)
0.0
0.0

Kuhusu mteja

Bedera ya QATAR
Mansoura, Qatar
5.0
1
Njia ya malipo imethibitishwa
Mwanachama tangu Mei 16, 2014

Uthibitishaji wa Mteja

Asante! Tumekutumia kiungo cha kudai mkopo wako bila malipo kwa barua pepe.
Hitilafu fulani imetokea wakati wa kutuma barua pepe yako. Tafadhali jaribu tena.
Watumiaji Waliosajiliwa Jumla ya Kazi Zilizochapishwa
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Onyesho la kukagua linapakia
Ruhusa imetolewa kwa Uwekaji wa Kijiografia.
Muda wako wa kuingia umeisha na umetoka nje. Tafadhali ingia tena.