GetDotted Domains

Viewing Thread:
"Getting a user's screen resolution?"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Mon 20/09/04 at 22:00
Regular
"Pouch Ape"
Posts: 14,499
I used to know a method in JS, but I think that was browser dependant. Flash can do it, but then if you haven't got it installed it tips up. Can PHP do it? Had a look on php.net, but no help so far.

Cheers
Tue 21/09/04 at 10:42
Regular
"Pouch Ape"
Posts: 14,499
Monitor. Doesn't matter now, I decided against what I was going to do.
Tue 21/09/04 at 10:06
Regular
"l33t cs50r"
Posts: 2,956
Nimco wrote:
> What phil said is correct. PHP is server-side so it cannot directly
> access client-side information such as screen-resolution. Some
> information is passed to the server, such as IP address and referring
> URI, but not screen-res. You need a client-side script such as
> JavaScript.

The only Server Side scripting I know of that can do this is JSP. Your only option is to use javascript or vbscript.

One question, are you trying to get the "monitor" resolution or "what the browser is doing" size?
Tue 21/09/04 at 02:17
Regular
"NULL"
Posts: 1,384
What phil said is correct. PHP is server-side so it cannot directly access client-side information such as screen-resolution. Some information is passed to the server, such as IP address and referring URI, but not screen-res. You need a client-side script such as JavaScript.
Mon 20/09/04 at 22:25
Regular
"It goes so quickly"
Posts: 4,083
[URL]http://www.aimlesswords.com/archives/20040612/javascript_screen_size_detect/[/URL] and see if this is what you were after.

This is something that couldn't be done with PHP alone I'm afraid, unless screen resolutions are passed through when the browser makes a page request, which I'm prety sure it doesn't.
Mon 20/09/04 at 22:17
Regular
"Chavez, just hush.."
Posts: 11,080
Correct me if I'm wrong, but PHP is server side so it won't be able to determine any stuff like that by itself. The info would have to be sent to the server for processing first and the only way to get the info would be JS...

Javascript can detect stuff off of the browser and (eg) provide a real time clock from your PC, PHP can only print the time of the clock off of the server if you see what I mean...

You'll need something browser based to determine it, or maybe a mixture of PHP and Javascript.
Mon 20/09/04 at 22:00
Regular
"Pouch Ape"
Posts: 14,499
I used to know a method in JS, but I think that was browser dependant. Flash can do it, but then if you haven't got it installed it tips up. Can PHP do it? Had a look on php.net, but no help so far.

Cheers

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Unrivalled services
Freeola has to be one of, if not the best, ISP around as the services they offer seem unrivalled.
Wonderful...
... and so easy-to-use even for a technophobe like me. I had my website up in a couple of hours. Thank you.
Vivien

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.