| | #1 |
| Warrior Member Join Date: 2015 Location: india
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
How can we get the browser properties using PHP?
|
| |
| | #2 |
| Active Warrior Join Date: 2014
Posts: 84
Thanks: 5
Thanked 11 Times in 10 Posts
|
Which properties? Generally PHP resides on your server and it has nothing to do with the client ( web browser ) . You can get only what browser sends you : referrer and user agent string . There's some php function get_browser() that will get some info based on user agent string (PHP: get_browser - Manual) . But generally Javascript is the language that talks directly with your browser, so you might gather the required information with javascript and then send it to server by ajax. |
| |
| | #3 |
| Active Warrior Join Date: 2015 Location: India
Posts: 47
Thanks: 0
Thanked 8 Times in 7 Posts
| You can use get_browser() function $browser_details = get_browser(null, true); print_r($browser_details); |
| |
| | #4 |
| Sam War Room Member Join Date: 2012
Posts: 450
Thanks: 9
Thanked 41 Times in 37 Posts
|
Here's the code <?php echo $_SERVER['HTTP_USER_AGENT'] . “\n\n”; $browser = get_browser(); print_r($browser); ?> |
| | |
| |
|
| Bookmarks |
| Tags |
| browser, php, properties |
| |