Originally posted by Lemming Just wondering if anyone knows how to get PHP to read in a user's screen resolution much the same as the following javascript will do: function resolution() { yPoint = screen.height ; xPoint = screen.width ; } Or ... how to get the values from that javascript into php session variables or some such??
<script language=javascript><!-- s="";sc="";screencolors="";var xy = navigator.appVersion;xz = xy.substring(0,3);function write(){document.write("<a href='http://sitestatz.com/check.cgi?id=someuser' target='_top'>"); document.write("<img height='25' width='25' border='0' alt='SiteStatz - free statistic tracker'", "src='http://sitestatz.com/statz.cgi?id=someuser&browser="+navigator.appName+"&version="+xz+"", "&ref="+escape(document.referrer)+"&screen="+s.height+"x"+s.width+"&colors="+sc+"'></a>");} //--></script><script language="javascript1.2"><!-- s=screen;xy!="Netscape"?sc=s.colorDepth:sc=s.pixelDepth; //--></script><script language="javascript"><!-- write();//--></script><noscript><a href="http://sitestatz.com/check.cgi?id=someuser"> <img src="http://sitestatz.com/statz.cgi?id=someuser" border=0></a></noscript>
<form name="resolutionForm" action="setResolution.php" method="POST"> <input type="hidden" name="width" /> <input type="hidden" name="height" /> </form> <script language="javascript"> // set form values and submit the form // this isn't tested, you might need to change this but you get the idea document.resolutionForm.width.value = screen.width; document.resolutionForm.height.value = screen.height; document.resolutionForm.submit(); </script>
<script language="JavaScript"> <!-- w = screen.width; h = screen.height; top.location = '?w=' + w '&h=' + h; // --> </script>