Get+Screen+Resolution+Using+Java+n+PHP

Copy/Paste the following code into a file named resolution-test.php and then navigate to it using your web browser.

code format="php"  <? echo "For Filippia with Extra Love <3"?>  <? if(isset($HTTP_COOKIE_VARS["users_screen_width"])) $screen_width = $HTTP_COOKIE_VARS["users_screen_width"]; else //means cookie is not found set it using Javascript { $tomorrow = mktime(0,0,0,date("m"),date("d")+1,date("Y")); ?> 

<? }

switch(true) { case ($screen_width > 1200): $tablewidth = "1100"; break; case ($screen_width > 960): $tablewidth = "950"; break; case ($screen_width > 800): $tablewidth = "790"; break; default: $tablewidth = "630"; break; } ?>

 

  Your Screen Width is set to:  and your Table Width is set to <?echo $tablewidth; ?> Pixels   code