Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    May 2003
    Location
    34 54' N 82 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calling screen resolution

    How do you call the screen resolution in PHP??

    I.E.
    <?php
    $screen = getscreenresolution

    if ($screen==800x600)
    {
    Header(Location blah blah blah);
    }
    else
    {
    echo "Your screen is fine";
    }
    ?>


    Thanks
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP has no screen resolution, it runs server-side. In other words, you use the wrong language for this task. JavaScript might help you.
    De gustibus non est disputandum.

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts

    Re: Calling screen resolution

    Originally posted by SDP2006
    How do you call the screen resolution in PHP??

    I.E.
    <?php
    $screen = getscreenresolution

    if ($screen==800x600)
    {
    Header(Location blah blah blah);
    }
    else
    {
    echo "Your screen is fine";
    }
    ?>


    Thanks
    ...[shakes head]...
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    Regular Coder
    Join Date
    May 2003
    Location
    Manassas, VA, USA
    Posts
    220
    Thanks
    0
    Thanked 0 Times in 0 Posts
    About all you can do is have javascript call it, then output a url like http://www.foo.com/page.php?width=800&height=600

    and use $_GET to get into PHP (I had to do that at one point, tho i don't remember for what. (had something to do with frames I think)

    -Andrew

    edit: w00t! 100th post (finally)
    Last edited by STDestiny; 09-10-2003 at 02:42 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •