Page 1 of 1
How much user information is PHP able to collect?
Posted: Sat Jan 03, 2009 11:32 am
by Sindarin
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?
Posted: Sat Jan 03, 2009 11:46 am
by Eran
Re: How much user information is PHP able to collect?
Posted: Sat Jan 03, 2009 4:49 pm
by Sindarin
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)"
Re: How much user information is PHP able to collect?
Posted: Sat Jan 03, 2009 4:52 pm
by Eran
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?
Posted: Fri Jan 09, 2009 4:57 am
by Sindarin
ah array values I see, thanks.
Re: How much user information is PHP able to collect?
Posted: Tue Jan 20, 2009 6:49 am
by Sindarin
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?