Php Resolution Detection? - Is it possible to do without using JS?

free web hosting
Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

Php Resolution Detection? - Is it possible to do without using JS?

gaea
A quick question for all you coders. I'm looking for a way to autodetect a viewer's screen resolution without using javascript (as some people have it disabled). Is there any way to do this via a purely server side function, e.g. php?

Thanks.

Reply

electron
Well till where i know this is impossible.
Also if the user has no javascript request them to switch it on.

But why do you need PHP to do this work because it is Server side while Javascript is Client side.

Reply

rvalkass
It is impossible for PHP to detect the size of the browser window. PHP is run on the web server and outputs the results of the functions you tell it to run as HTML code, no PHP ever reaches the client browser. You will need a client-side scripting language, one run on the viewer's browser, so that it can detect what is happening on their PC. All client side scripts can be disabled though, so you won't avoid that problem.

Why do you need to detect the browser size anyway? If it's for a layout surely you can use some CSS tricks to achieve the same? It may not look that pretty but people can't disable it and they very rarely read through your CSS.

Reply

gaea
QUOTE(rvalkass @ Sep 9 2006, 07:14 AM) *
It is impossible for PHP to detect the size of the browser window. PHP is run on the web server and outputs the results of the functions you tell it to run as HTML code, no PHP ever reaches the client browser. You will need a client-side scripting language, one run on the viewer's browser, so that it can detect what is happening on their PC. All client side scripts can be disabled though, so you won't avoid that problem.

Why do you need to detect the browser size anyway? If it's for a layout surely you can use some CSS tricks to achieve the same? It may not look that pretty but people can't disable it and they very rarely read through your CSS.


I didn't think there was a way, but I figured I mind as well ask. smile.gif As for the use, yes it is for a layout. I'll probably wind up writting a javascript to switch the stylesheets. And have a no script default.

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. window detect resolution - 17.18 hr back. (1)
  2. php detect window size - 25.15 hr back. (1)
  3. php detect resolution - 27.69 hr back. (2)
  4. css detecting resolution - 46.53 hr back. (1)
  5. php reading screen resolution - 56.68 hr back. (1)
  6. php screen resolution - 34.72 hr back. (2)
  7. browser window size detection - 58.89 hr back. (1)
  8. browser resolution detection - 65.29 hr back. (1)
  9. php resolution - 65.64 hr back. (1)
  10. php browser resolution - 72.51 hr back. (2)
  11. screen resolution using php - 94.23 hr back. (1)
  12. php get resolution - 109.06 hr back. (1)
  13. php resolution - 36.31 hr back. (7)
  14. get resolution php - 112.90 hr back. (1)
Similar Topics

Keywords : php, resolution, detection, js

  1. Detect Image Resolution Without Gd
    Also stop error if not found (1)


      Looking for php, resolution, detection, js

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for php, resolution, detection, js

*MORE FROM TRAP17.COM*
advertisement



Php Resolution Detection? - Is it possible to do without using JS?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE