Posted by Scott on 04/04/06 12:12
On Tue, 2006-04-04 at 01:28 -0700, webramz@gmail.com wrote:
> You can do this by JavaScript not PHP (or both of them together for
> some reason):
>
> <script language="JavaScript>
> var w = screen.width;
> var h = screen.height;
>
> alert('You are using ' + w + 'x' + h + ' resolution...!');
>
> </script>
>
> Behzad Nategh
>
You could then send that info to PHP by adding:
document.location.href = 'http://www.currentpage.com?w='+w+'&h='+h;
Then use $_GET['w'] and $_GET['h'] for your resolution.
Of course, this method assumes the user has javascript enabled on their
browser.
Navigation:
[Reply to this message]
|