Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 7th Dec 2015, 02:13 AM   #1
Warrior Member
 
Join Date: 2015
Location: india
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default
How can we get the browser properties using PHP?
Share on: 
fb share twitter share gplus share more share

How can we get the browser properties using PHP?
AdneyP is offline  
Unread 7th Dec 2015, 02:21 AM   #2
Active Warrior
 
Join Date: 2014
Posts: 84
Thanks: 5
Thanked 11 Times in 10 Posts
Default
Re: How can we get the browser properties using PHP?
Share on: 
fb share twitter share gplus share more share

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.
robomedia is offline  
Unread 7th Dec 2015, 02:22 AM   #3
Active Warrior
 
Join Date: 2015
Location: India
Posts: 47
Thanks: 0
Thanked 8 Times in 7 Posts
Default
Re: How can we get the browser properties using PHP?
Share on: 
fb share twitter share gplus share more share

You can use get_browser() function

$browser_details = get_browser(null, true);
print_r($browser_details);
Yadav Poonam is offline  
Unread 7th Dec 2015, 02:56 AM   #4
Sam
War Room Member
 
eluminoustechnologies's Avatar
 
Join Date: 2012
Posts: 450
Thanks: 9
Thanked 41 Times in 37 Posts
Default
Re: How can we get the browser properties using PHP?
Share on: 
fb share twitter share gplus share more share

Here's the code

<?php
echo $_SERVER['HTTP_USER_AGENT'] . “\n\n”;
$browser = get_browser();
print_r($browser);
?>

eluminoustechnologies is offline  
Closed Thread


Bookmarks

Tags
browser, php, properties


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 08:20 PM.