Link to home
Start Free TrialLog in
Avatar of mattjp88
mattjp88Flag for United States of America

asked on

get user info

I am looking for a way to somehow get information about the visiting use through PHP (not Javascript).  I am looking for a way to get resolution and color depth.  I am pretty sure that there is a way to get this information through PHP, but I can't seem to find it on the net.  Also, if possible the screen width and height would be nice as well as javascript version.  Chances are that the last 3 wont be able to be acheived, but I am not sure.

Thanks!
Matt
ASKER CERTIFIED SOLUTION
Avatar of Zyloch
Zyloch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hmm.. had a look at that. If that's the case, this function:

function getColorDepth() {
   if (window.screen.colorDepth) {
      return(window.screen.colorDepth);
   } else if (window.screen.pixelDepth) {
      return(window.screen.pixelDepth);
   }
   return false;
}
The Javascript summary provides is pretty old and clunky, so I wouldn't follow it too much - it's lacking some basic things like type attributes, and its installation instructions break W3C validation, however, it will do the trick. Your function collection is far neater, it just needs a higher-level function to gather all that info and turn it into a request, so the answer is somewhere between the two. Fancy writing it?
True, I'll have to wait and see how he wants it though, (and I'm prolonging it ;)
Avatar of mattjp88

ASKER

Well, I wanted a way for me to get some of the user datails only through PHP, not javascript.  And from what you said and also what many internet sites say; it's impossible.  Thanks for your help!

-Matt