<script language='javascript'>
function writeCookie() {
var date = new Date();
date.setTime(date.getTime()+(2*24*60*60*1000));
var expires = '; expires='+date.toGMTString();
var the_cookie = 'resolution='+ screen.width + 'x' + screen.height;
document.cookie = the_cookie+expires+'; path=/';
}
writeCookie();
</script>
$rez = $_COOKIE['resolution'];