hello there!
How would I get the name of a users browser using php? I'm presuming it's possible. I basicly want to get the users ip address, hostname and browser. I can get the ip/hostname and get the info to store in the databse but how would i get the browser? Also it'd be quite handy if it were possible for me to determine the operating system if thats possible? i'm not sure if it is...
Thank you
browser information using php?
Moderator: General Moderators
-
shadow_blade47
- Forum Newbie
- Posts: 12
- Joined: Fri Nov 07, 2003 3:41 am
I'm not 100% sure about this but run a script with this:
You'll get the array of what you can get from the client side.
Hope it helps,
-Nay
Code: Select all
<?php
print_r($_SERVER);
?>Hope it helps,
-Nay
-
shadow_blade47
- Forum Newbie
- Posts: 12
- Joined: Fri Nov 07, 2003 3:41 am
browser
hmm, tried it, but i need something along the lines of $_SERVER['REMOTE_ADDR'] shame $_SERVER['REMOTE_BROWSER'] Dont work
but thanks anyway...
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
[php_man]get_browser()[/php_man]
Code: Select all
<?php
$var = get_browser()->browser;
?>Just a side note: this syntax isn't allowed in PHP4 since it doesn't dereference returned value. If you use PHP4, you need the intermediate variable:LiLpunkSkateR wrote:[php_man]get_browser()[/php_man]
Code: Select all
<?php $var = get_browser()->browser; ?>
Code: Select all
$var=get_browser();
$var=$var->browser;