Find Jobs
Hire Freelancers

PHP Operating system detection

$10-12 USD

Zaprt
Objavljeno pred več kot 2 letoma

$10-12 USD

Plačilo ob dostavi
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 } ?>
ID projekta: 31560021

Več o projektu

14 ponudb
Projekt na daljavo
Aktivno pred 2 letoma

Želite zaslužiti?

Prednosti oddajanja ponudb na Freelancerju

Nastavite svoj proračun in časovni okvir
Prejmite plačilo za svoje delo
Povzetek predloga
Registracija in oddajanje ponudb sta brezplačna
14 freelancerjev je oddalo ponudbo s povprečno vrednostjo $13 USD za to delo
Avatar uporabnika
Hi, I have checked the code and can see the problem, will solve it right now, thanks..............................
$11 USD v 1 dnevu
4,9 (462 ocen)
6,8
6,8
Avatar uporabnika
-------------- Nice to meet you. I'm Sergey. -------------- I'm php expert. Please chat me. I can solve your your problems.
$11 USD v 7 dneh
5,0 (6 ocen)
3,1
3,1
Avatar uporabnika
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 v 7 dneh
5,0 (2 ocen)
2,7
2,7
Avatar uporabnika
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 v 1 dnevu
5,0 (2 ocen)
1,3
1,3
Avatar uporabnika
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 v 7 dneh
5,0 (2 ocen)
1,3
1,3
Avatar uporabnika
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 v 1 dnevu
3,5 (2 ocen)
1,3
1,3
Avatar uporabnika
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 v 2 dneh
5,0 (2 ocen)
0,6
0,6
Avatar uporabnika
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 v 7 dneh
0,0 (0 ocen)
0,0
0,0
Avatar uporabnika
I think I know your problem is on something like function calling problem. In here we need to literally call that first.
$11 USD v 1 dnevu
0,0 (0 ocen)
0,0
0,0

O stranki

Zastava QATAR
Mansoura, Qatar
5,0
1
Plačilna metoda je verificirana
Član(ica) od maj 16, 2014

Verifikacija stranke

Hvala! Po e-pošti smo vam poslali povezavo za prevzem brezplačnega dobropisa.
Pri pošiljanju vašega e-sporočila je šlo nekaj narobe. Poskusite znova.
Registrirani uporabniki Skupaj objavljenih del
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Nalaganje predogleda
Geolociranje je bilo dovoljeno.
Vaša prijavna seja je potekla, zato ste bili odjavljeni. Prosimo, da se znova prijavite.