How much user information is PHP able to collect?
Moderator: General Moderators
How much user information is PHP able to collect?
I know so far that I can get the IP, hostname ,browser name, referrer. Is there any more information I can get using PHP like e.g. screen resolution, exit address etc.?
Re: How much user information is PHP able to collect?
So I'll have to get the rest through javascript?
Btw, how can I tell PHP to cut short browser names/version from $_SERVER['HTTP_USER_AGENT']?
for e.g. when someone with Firefox visits the site it will display "Windows, Firefox 2.0 not "Mozilla/5.0(Windows; U; Windows NT 6.0; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20 (.NET CLR 3.5.30729)"
Btw, how can I tell PHP to cut short browser names/version from $_SERVER['HTTP_USER_AGENT']?
for e.g. when someone with Firefox visits the site it will display "Windows, Firefox 2.0 not "Mozilla/5.0(Windows; U; Windows NT 6.0; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20 (.NET CLR 3.5.30729)"
Re: How much user information is PHP able to collect?
You'll need to parse it yourself, or rely on something like get_browser() - http://www.php.net/get_browser
Re: How much user information is PHP able to collect?
ah array values I see, thanks.
Re: How much user information is PHP able to collect?
get_browser() works but it seems the browscap.ini is outdated on my host. Isn't a way to parse the information from HTTP_USER_AGENT individually?