Needs some work but the basics are there…..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
<?php if(!isset($_GET['screen_check'])) { /* This code will be executed if screen resolution has not been detected.*/ echo "<script language='JavaScript'> <!-- document.location=\"$PHP_SELF?screen_check=done&Width=\"+screen.width+\"&Height=\"+screen.height; //--> </script>"; } else { /* This code will be executed after screen resolution is detected.*/ if(isset($_GET['Width']) && isset($_GET['Height'])) { // Resolution detected echo "<h1>Your screen resolution is ".$_GET['Width']." x ".$_GET['Height'].".</h1><br />"; //Display page as per resolution if($_GET['Width']<1024) { } } }echo $_GET['Width']; ?> |