Find Jobs
Hire Freelancers

PHP Operating system detection

$10-12 USD

Closed
Posted over 2 years ago

$10-12 USD

Paid on delivery
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 } ?>
Project ID: 31560021

About the project

14 proposals
Remote project
Active 2 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
14 freelancers are bidding on average $13 USD for this job
User Avatar
Hi, I have checked the code and can see the problem, will solve it right now, thanks..............................
$11 USD in 1 day
4.9 (462 reviews)
6.8
6.8
User Avatar
-------------- Nice to meet you. I'm Sergey. -------------- I'm php expert. Please chat me. I can solve your your problems.
$11 USD in 7 days
5.0 (6 reviews)
3.1
3.1
User Avatar
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 in 7 days
5.0 (2 reviews)
2.7
2.7
User Avatar
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 in 1 day
5.0 (2 reviews)
1.3
1.3
User Avatar
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 in 7 days
5.0 (2 reviews)
1.3
1.3
User Avatar
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 in 1 day
3.5 (2 reviews)
1.3
1.3
User Avatar
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 in 2 days
5.0 (2 reviews)
0.6
0.6
User Avatar
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 in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I think I know your problem is on something like function calling problem. In here we need to literally call that first.
$11 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of QATAR
Mansoura, Qatar
5.0
1
Payment method verified
Member since May 16, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.