Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logging users' screen resolutions

Status
Not open for further replies.

jimoblak

Instructor
Oct 23, 2001
3,620
US
I have seen javascript check a browser's resolution to determine what version of a web page to display (640x480? 800x600?... etc.). Is it possible to use PHP to determine this and write to a simple text file?

I would like to determine what screen resolutions are used to view the pages on my site.
 
The javascript for this is:
<script>document.write(screen.width + \&quot; x \&quot; + screen.height)</script>

Can the values of 'screen.width' and 'screen.height' be converted to PHP variables?
 
Two methods:

Put two hidden fields on a form somewhere and have JavaScript set the values of the fields when the page loads.

The next time your user clicks submit, the screen data will be sent with the rest of the data. ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top