I would have thought that as well, about the server v. client side-ness of PHP. But, I found a Browser Sniffer using PHP.
:: http://asphyxia.com/PHP_BD/ ::
It uses the HTTP_USER_AGENT variable. I didn't know if there was another global variable like this that can be utilized for detecting screen res.
Jeof