Forum Moderators: phranque
May someone comment about what free and if possible effective method use to track user's screen resolution? any good experiences you wanna share?
Thank you!
[phpbuddy.com...]
The script was.
<HTML>
<TITLE>Whatever</TITLE>
<HEAD>
<?
if(isset($HTTP_COOKIE_VARS["users_resolution"]))
$screen_res = $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, 2023");
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 = 'get_resolution.php';
}
//-->
</script>
<?
}
?>
</HEAD>
<BODY>
<?php
echo "Your Screen resolution is set at ". $screen_res;
?>
</BODY>
</HTML>
Does someone know how to keep track of that?
Something like
1024*768 users = 500
800*600 users = 300
bla bla
Or percentages or graphic charts...