How can you get web browser’s details using PHP?

by heather_fritsch , in category: Technology , 3 years ago

How can you get web browser’s details using PHP?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by aaliyah , 3 years ago

get_browser() function is used to retrieve the client browser details in PHP. This is a library function is PHP which looks up the browscap.ini file of the user and returns the capabilities of its browser.

Syntax:

1
get_browser(user_agent,return_array);

Example Usage:

1
2
$browserInfo = get_browser(null, true); 
print_r($browserInfo);