how to get user’s screen resolution with PHP [duplicate]

You need JavaScript, not PHP.

var screenWidth = window.screen.width,
    screenHeight = window.screen.height;

You can then send it to the server via Ajax (with an XmlHttpRequest).

See also the MDC window.screen docs.

Leave a Comment