Page 1 of 1

How to get the screen size with PHP?

Posted: Sun Jun 08, 2003 6:05 am
by Tokee
Hello everybody!

I am new to PHP.. is there a way like in javascript to get the screen size?
Or need I a combination with java like:

$screen_size_var = screen.width;

please help & thanks!

Posted: Sun Jun 08, 2003 6:21 am
by redhair
PHP can not get your screen size. (..simply because it is server based)
You can however do it with javascript. and use the result in a php variable....or store it in a cookie whatever.

Posted: Sun Jun 08, 2003 6:30 am
by Tokee
Well, thanks!
But I cannot code with java, because I do'nt know anything about it. Do you know the needed lines?

Posted: Sun Jun 08, 2003 6:33 am
by twigletmac
If you search these forums for 'screen resolution' you'll get a bunch of results, the following thread is one of them:
viewtopic.php?t=7380&highlight=resolution

Mac