Getting visitors screen resolution

I would like to be able to get the visitors screen resolution when he/she runs my CGI-script and then do various things depending on the results. Can this be done in some way?
LVL 1
dedsiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

shiversCommented:
as screen resolution & colour depth aren't given to CGI scripts as parameters, the only way I know of is to have some Javascript on the web page which detects the screen resolution and calls the CGI with different parameters depending on the result.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
feenixCommented:
That's true, and even that only works if the user has JavaScript enabled AND has a browser that gives the information out.
0
jhurstCommented:
fork() is what you need.  It will create a copy of the running process and return the pid of that new process.  So, you form four copies of yourself and have them do the work, or even do a system() to do the work.  Then you can check for the pid status as you want.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

dedsiAuthor Commented:
jhurst,

I dont really understand your answer. Can you please explain a little bit more in detail what I should do to be able to get the visitors screen resolution using this fork()?
0
jhurstCommented:
Ignore my answer.  EE has messed up.  I had posted this answer to a completely different question.  Sorry!
0
dedsiAuthor Commented:
Okay.
0
khalilmCommented:
If you wanted to save yourself the hassle of figuring out how to do this, you could install a HitBox counter (http://www.hitbox.com and look for "Get a Hitbox") on your page. Sure you have to display a graphic, but for the "inconvenience" you get not only screen resolutions but a whole lot of other useful traffic information as well.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.