How to get the screen size with PHP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Tokee
Forum Newbie
Posts: 5
Joined: Sun Jun 08, 2003 6:05 am

How to get the screen size with PHP?

Post 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!
User avatar
redhair
Forum Contributor
Posts: 300
Joined: Fri May 30, 2003 4:36 pm
Location: 53.23N-6.57E
Contact:

Post 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.
Tokee
Forum Newbie
Posts: 5
Joined: Sun Jun 08, 2003 6:05 am

Post by Tokee »

Well, thanks!
But I cannot code with java, because I do'nt know anything about it. Do you know the needed lines?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
Post Reply