Forum Moderators: coopster
The way you would need to do it is to have Javascript that appends the query string to the URL when the user clicks on it, but in any case the user would need to view one page before you could do anything with PHP.
Having said that, you'd need to be careful with this, and not get too overzealous. Done right it could improve certain sites, done wrong, it could be a UI disaster.
Let us know how you get on!
<script language="javascript">
window.location.href = "screen.php?width=" + screen.width + "&height=" + screen.height;
</script>
Then create a file called screen.php and use this:
<?php
$width = $_GET['width'];
$height = $_GET['height'];
echo "You are using a $width x $height screen resolution";
?>
window.location.href = "screen.php?width=" + screen.width + "&height=" + screen.height;
but what is the file name/created with your method?
window.location.href = window.location + "?width=" + screen.width + "&height=" + screen.height;
Obviously I am not much of a JS person :)