Jump to content

**SOLVED** Get screen resolution with php?


jcoones

Recommended Posts

Anyone know how to determine a browser's screen resolution with php or can it only be done with Javascript?

I want to set up an include file with some code that would say something like:

if(screen resolution is 800x600){
echo "<img src=Images/thisImage.gif>";
}
else {
echo "<img src=Images/anotherImage.gif>";
}


Thanks


Please ignore this post. I figured it out!

Thanks anyway. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
Link to comment
Share on other sites

[!--quoteo(post=377681:date=May 27 2006, 07:34 PM:name=jcoones)--][div class=\'quotetop\']QUOTE(jcoones @ May 27 2006, 07:34 PM) [snapback]377681[/snapback][/div][div class=\'quotemain\'][!--quotec--]

Please ignore this post. I figured it out!

[/quote]

Did you figure out how to do it in PHP? If so would you please post the solution so others may see.
Link to comment
Share on other sites

Not really! What I wanted to do was to have one image that would be displayed on every page of my site if a user's browser was set to 800x600 and another image that would be displayed if a user's browser was set to 1028x768.

What I ended up doing was creating a php include file that had a small Javascript in it and I included that file on each of my site pages.

A bit of a kludge but it works fine. [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.