yes you can do it with php
here is a scrip we wrote to show you
just copy and past this code into a notepad and save it as webune-screensize.php and upload to your website and open it with your browser
<HTML>
<TITLE>Getting User's Screen Resolutions with PHP Script Code Sample Example</TITLE>
<HEAD>
<?
######## __________________________ ###########
######## SCRIPT BY WEBUNE.COM #################
######## PLEASE DO NOT REMOVE THIS ############
######## __________________________ ###########
if(isset($HTTP_COOKIE_VARS["users_resolution"]))
$screen_resolution = $HTTP_COOKIE_VARS["users_resolution"];
else //means cookie is not found set it using Javascript
{
?>
<script language="javascript">
<!--
writeCookie();
function writeCookie()
{
var today = new Date();
var the_date = new Date("December 31, 2010");
var the_cookie_date = the_date.toGMTString();
var the_cookie = "users_resolution="+ screen.width +"x"+ screen.height;
var the_cookie = the_cookie + ";expires=" + the_cookie_date;
document.cookie=the_cookie
location = 'show-user-screen-resolution-php.php.php';
}
//-->
</script>
<?
}
?>
</HEAD>
<style type="text/css">
<!--
.style1 {color: #0000FF}
.style2 {color: #0066FF}
.style3 {color: #CC0000}
-->
</style>
<BODY>
<h1 align="center" class="style2"><strong>Your Screen Resolutions is set to:</strong> <?php echo $screen_resolution; ?></h1>
<div align="center">Turotial by <a href="http://www.wallpaperama.com">Wallpaperama.com</a></div>
<hr size="2" noshade>
<p>Hello and Welcome to this Wallpaperama "Get User's Screen Resolution" Script.</p>
<p>As webmaster, we often need to get the user's screen resolution to make our visitor's expirience more enjoyable and fun.</p>
<p>One way wallpaperama has implemented this, is to customize specific webpages to our visitors depending on the computer screen resolution
setting or properties.</p>
<p>The PHP function to do this is: <span class="style1">isset</span>(<span class="style2">$HTTP_COOKIE_VARS</span>[<span
class="style3">"users_resolution"</span>])</p>
<p><a href="http://www.wallpaperama.com/"><< Go Back</a> </p>
<p align="center">PHP Hosting by <a href="http://www.webune.com">Webune.com</a> </p>
<p>
</BODY>
</HTML>