Solved

How to get users screen resolution?

Posted on 2002-06-15
4
214 Views
Last Modified: 2006-11-17
How can I get users screen resolution?
0
Comment
Question by:wcoka
[X]
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
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

732 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