Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-09-2003, 08:53 PM   PM User | #1
SDP2006
Regular Coder

 
Join Date: May 2003
Location: 34° 54' N 82° 13' W
Posts: 996
Thanks: 0
Thanked 0 Times in 0 Posts
SDP2006 is an unknown quantity at this point
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!
SDP2006 is offline   Reply With Quote
Old 09-09-2003, 09:05 PM   PM User | #2
mordred
Senior Coder


 
Join Date: Jun 2002
Location: frankfurt, german banana republic
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
mordred is an unknown quantity at this point
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.
mordred is offline   Reply With Quote
Old 09-09-2003, 09:08 PM   PM User | #3
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
Re: Calling screen resolution

Quote:
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
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 09-10-2003, 02:38 AM   PM User | #4
STDestiny
Regular Coder

 
Join Date: May 2003
Location: Manassas, VA, USA
Posts: 220
Thanks: 0
Thanked 0 Times in 0 Posts
STDestiny is an unknown quantity at this point
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..
STDestiny is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:31 PM.


Advertisement
Log in to turn off these ads.