I am trying to get a better understanding of PHP and JS, and decided to take this simple function.
    <script>
        function getScreenResolution() {
            var screenResolutionW = screen.width; 
            var screenResolutionH = screen.height;
        }
    </script>
I would like to know how I could "convert" this to a PHP function, so that I can write this screen.width and screen.height information to a log.txt using PHP like so:
$fh = fopen('log.txt', 'a');
fwrite($fh, 'Screen res: '."".$screenResolutionW. 'x'."".$screenResolutionH  ."\r\n");
fclose($fh);
