...

View Full Version : Calling screen resolution



SDP2006
09-09-2003, 08:53 PM
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

mordred
09-09-2003, 09:05 PM
PHP has no screen resolution, it runs server-side. In other words, you use the wrong language for this task. JavaScript might help you.

Spookster
09-09-2003, 09:08 PM
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]... :rolleyes:

STDestiny
09-10-2003, 02:38 AM
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)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum