Mark,
please read something on server/client technology. It will help you a lot, belive me.
CGI/HTTP RFCs would be useful too.
Quick fix: you have to create a page with javascript that determines browser resolution and then immediately submit a form with these values back to the server. After that my suggestion would be to put resolution into a cookie, and use it from there.