Try google with "php detect browser" as the search.
However, that only picks apart the user-agent and for PHP's get_browser(), compares against a data file. It will tell you a some of what vibhavram asked for but not the current screen resolution or pixel density.
The only way to do that is with JavaScript code running on the client. PHP is running on the server.
So, any resolution logic has to be included in the response page sent to the client and run there. After it runs, it could pass the information on to the server to use in later pages by setting a cookie, or using POST/GET variables.
Google "javascript detect resolution screen"