I need to find the screen resolution of a users screen who visits my website?
In PHP there is no standard way to get this information. However, it is possible if you are using a 3rd party solution. 51Degrees device detector for PHP has the properties you need:
Gives you Width and Height of user's screen in pixels. In order to use these properties you need to download the detector from sourceforge. Then you need to include the following 2 lines in your file/files where it's necessary to detect screen height and width:
Where path/to/core is path to 'Core' directory which you downloaded from sourceforge. Finally, to use the properties:
Keep in mind these variables can contain 'Unknown' value some times, when the device could not be identified.