PDA

View Full Version : Getting Resolutions


Cloudski
12-22-2002, 07:05 PM
Hello,

I was wondering if there was a way for PHP to get the screen resolution(640x480, etc...) a person is using when they are browsing a webpage.

Thanks for any help in advance!:D

krycek
12-22-2002, 07:16 PM
PHP cannot do this, but JavaScript can :)

::] krycek [::

Ökii
12-22-2002, 07:17 PM
not as far as I know.

you'd really want something like javascript to do the resolution check and maybe forward to another page

<script type="text/javascript">
w = screen.width;
h = screen.height;
document.location.replace('rescheckdone.php?w=' +w+ '&h=' +h+ ');
</script>

Cloudski
12-22-2002, 07:18 PM
Ah, that'll work, thanks for the idea...

Ökii
12-23-2002, 10:44 AM
actually that'll almost work :)

just lose the + ' from the end.

Cloudski
12-23-2002, 03:43 PM
Yeah, I got it working. Thank!:D