<script type="text/javascript">
//IE5+, Mozilla 1.0+, Opera 7+
function getClientWidth()
{
return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}
function getClientHeight()
{
return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}
</script>
<?php
$screenWidth='<script type="text/javascript">document.write("screen.width="+ getClientWidth());</script>';
$screenHeight='<script type="text/javascript">document.write("screen.height="+ getClientHeight());</script>';
echo $screenWidth;
echo $screenHeight;
?>