Oct 31

Getting screen resolution in PHP is done through javascript cookie.
How it works :
1.Javascript gets the user resolution and stores in the cookie
2.We can use PHP to read that cookie.

The following code snippet gives the resolution of a browser using php and javascript. However you can also modify the code to get height and width seperately (screen.width and screen.height are the parameters for width and height respectively).



PHP code for getting screen resolution


if(isset($HTTP_COOKIE_VARS["users_resolution"]))
$screen_res = $HTTP_COOKIE_VARS["users_resolution"];
else //no cookie set in Javascript
{
?>

}
?>


echo "Your Screen resolution is set at ". $screen_res;

?>

You can also get width or height alone

Code by www.dumpsquestions.com/webdeveloper


No related posts.

15 Responses to “PHP Code for screen Resolution”

  1. Admin Says:

    There is some problem.

  2. Admin Says:

    Sitemap code has to be fixed.

  3. Seo news Says:

    Nice website you have, the posts here are very useful. Thanks! :D

  4. Femmes russes Says:

    I searched for this theme! The following code snippet gives the resolution of a browser using php and javascript.

  5. Kristen Bell Says:

    However you can also modify the code to get height and width seperately (screen.width and screen.height are the parameters for width and height respectively..Good Luck

  6. Camarad Says:

    Thanks for this post! I searched for this theme! The following code snippet gives the resolution of a browser using php and javascript.

  7. January Jones Says:

    I think, this theme is quite actual now. I searched for this theme! The following code snippet gives the resolution of a browser using php and javascript.

  8. Replica Hermes handbags Says:

    Cheap Louis Vuitton Handbags great site and funny comic :D

  9. virtual assistant service Says:

    Thanks for providing this knowledgeable information, i think most of the peoples are get benefits from your blog.

  10. bedroom decorating ideas Says:

    Love reading the Post, you are doing a great job .

  11. professional writing company Says:

    In search of the site I want to study the whole Internet and found your site – it’s just finding me! thank you that you are

  12. University Hoodies Says:

    Hi I am a big reader, would really appreciate an invite. Your blog is very nice and I really enjoy the style and content. THanks

  13. iphone 4 cases swarovski Says:

    An interesting discussion might be priced at comment. I think that it is best to write more on that topic, it might not be considered a taboo subject but generally individuals are not enough to communicate on such topics. To the next. Cheers

  14. ezy bluray Says:

    I wanted to thank you for this great guide! This is a very informative post, it help me more. and i will share my website..

  15. business news blog Says:

    http://www.stumbleupon.com/stumbler/business-blog

Leave a Reply

Please copy the string 0DPeNh to the field below:



www.dumpsquestions.com © 2009