[PHP] Extract OS from HTTP header | Extraire le système d'exploitation de l'entête HTTP [PHP] Extract OS from HTTP header | Extraire le système d'exploitation de l'entête HTTP | Scripts | Codes

Scripts | Codes

All languages in three languages :-)



Extraire le système d'exploitation à partir de l'entête HTTP reçu...

... À appeler sans arguments

Extract the operating system from the received HTTP header...

... Call without arguments.

HTTP استخراج نظام التشغيل من رأس الطلب 

تنادى بدون معطيات

Open in a new window
<?
//#################################################
// find more codes on scripts-n-codes.blogspot.com
//#################################################
function extract_os() {
 $user_parts = explode(";", $_SERVER['HTTP_USER_AGENT']);
 $os = trim($user_parts[2]);
 $os = str_replace(')', '', $os);
 if($os == '') $os = 'unknown';
 return $os;  
}
?>

0 commentaires

Post a Comment

Subscribe to: Post Comments (Atom)
attendez....