PHP get_browser() Funzione
Esempio
Cerca il file browscap.ini e restituisce le funzionalità del browser:
<?php
echo $_SERVER['HTTP_USER_AGENT'];
$browser = get_browser();
print_r($browser);
?>
Definizione e utilizzo
La funzione get_browser() cerca il file browscap.ini dell'utente e restituisce le funzionalità del browser dell'utente.
Sintassi
get_browser(user_agent,return_array)
Valori dei parametri
Parameter | Description |
---|---|
user_agent | Optional. Specifies the name of an HTTP user agent. Default is the value of $HTTP_USER_AGENT. You can bypass this parameter with NULL |
return_array | Optional. If this parameter is set to TRUE, the function will return an array instead of an object |
Dettagli tecnici
Valore di ritorno: | Restituisce un oggetto o una matrice con informazioni sul browser dell'utente in caso di esito positivo o FALSE in caso di errore |
---|---|
Versione PHP: | 4+ |
Registro delle modifiche: | Il parametro return_array è stato aggiunto in PHP 4.3.2 |
❮ Riferimento a varie PHP