Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to get users screen resolution?

Posted on 2002-06-15
4
202 Views
Last Modified: 2006-11-17
How can I get users screen resolution?
0
Comment
Question by:wcoka
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
dkjariwala earned 30 total points
ID: 7081268
You will have to use javascript.

<html>
<head>
<title> screen resolution</title>
</head>
<html>
<body>
<script language="javascript">

document.href= "http://yourserver/yourscript.php?s_ht=" + screen.height + "&s_wit="  + screen.width";

</script>
</html>
Following code will redirect to yourscript.php and pass on screen height and width.

JD
0
 

Author Comment

by:wcoka
ID: 7081282
but is there any way how to get this directly from PHP?
0
 
LVL 5

Expert Comment

by:dkjariwala
ID: 7081356
No.

PHP running on server side can not talk to clients machine directly. You MUST use javascript or some other tool.

JD
0
 

Author Comment

by:wcoka
ID: 7081358
Thanks anyway
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question