Check visitors resolution !!

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

dangr142
New php-forum User
New php-forum User
Posts: 3
Joined: Sun Jan 05, 2003 4:18 pm
Location: Sweden
Contact:

Check visitors resolution !!

Postby dangr142 » Sun Jan 05, 2003 4:23 pm

Is there any way I can check what resolution visitors to my homepage are using so I can have different setting based on the resolution ???

Hurkle
New php-forum User
New php-forum User
Posts: 36
Joined: Tue Jan 07, 2003 8:45 am
Location: Minnesota, USA

Postby Hurkle » Tue Jan 07, 2003 2:47 pm

I don't know of any way to do this without using client side scripting of some kind. If you know javascript, the users screen resolution can be found by checking the values of screen.width and screen.height. If you go to you favorite search engine, like google.com, and type in :
javascript "detect screen resolution"

you'll find lots of stuff telling you how to do this.

To do this without client side scripting, I would simply have some links that let the user click 'larger' or 'smaller' until the display matches their screen resolution.

Best of luck, and if you find a way to do this in straight php, let me know.

dangr142
New php-forum User
New php-forum User
Posts: 3
Joined: Sun Jan 05, 2003 4:18 pm
Location: Sweden
Contact:

Postby dangr142 » Tue Jan 07, 2003 3:12 pm

What I've found out is that you can't do it with just PHP. You will need to use Javascript. Found some sites that had just what I wanted.

I'll promise to post a message if I find a PHP solution to the problem... :)

Thanks !!!


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 6 guests