Solved

How to get users screen resolution?

Posted on 2002-06-15
4
173 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
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 dynamically set the form action using jQuery.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now