Find Jobs
Hire Freelancers

PHP Operating system detection

$10-12 USD

Chiuso
Pubblicato più di 2 anni fa

$10-12 USD

Pagato al completamento
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 } ?>
Rif. progetto: 31560021

Info sul progetto

14 proposte
Progetto a distanza
Attivo 2 anni fa

Hai voglia di guadagnare un po'?

I vantaggi delle offerte su Freelancer

Imposta il tuo budget e le scadenze
Fatti pagare per il lavoro svolto
Delinea la tua proposta
La registrazione e le offerte sui lavori sono gratuite
14 freelance hanno fatto un'offerta media di $13 USD
Avatar dell'utente
Hi, I have checked the code and can see the problem, will solve it right now, thanks..............................
$11 USD in 1 giorno
4,9 (462 valutazioni)
6,8
6,8
Avatar dell'utente
-------------- Nice to meet you. I'm Sergey. -------------- I'm php expert. Please chat me. I can solve your your problems.
$11 USD in 7 giorni
5,0 (6 valutazioni)
3,1
3,1
Avatar dell'utente
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 giorni
5,0 (2 valutazioni)
2,7
2,7
Avatar dell'utente
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 giorno
5,0 (2 valutazioni)
1,3
1,3
Avatar dell'utente
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 giorni
5,0 (2 valutazioni)
1,3
1,3
Avatar dell'utente
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 giorno
3,5 (2 valutazioni)
1,3
1,3
Avatar dell'utente
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 giorni
5,0 (2 valutazioni)
0,6
0,6
Avatar dell'utente
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 giorni
0,0 (0 valutazioni)
0,0
0,0
Avatar dell'utente
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 giorno
0,0 (0 valutazioni)
0,0
0,0

Info sul cliente

Bandiera: QATAR
Mansoura, Qatar
5,0
1
Metodo di pagamento verificato
Membro dal mag 16, 2014

Verifica del cliente

Grazie! Ti abbiamo inviato tramite email il link per richiedere il tuo bonus gratuito.
Non è stato possibile inviarti l'email. Riprova per piacere.
di utenti registrati di lavori pubblicati
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Caricamento anteprima
Autorizzazione per la geolocalizzazione concessa.
La tua sessione è scaduta ed è stato effettuato il log out. Accedi nuovamente per piacere.