Http_x_up_devcap_screenpixels

Started on the old forum in September 2010 · view the original in the archive · old links redirect here

6 replies · 1,303 views · started 16 years ago · 1 min read

2 participants
Guest #1

Hello how would you use this code to display the screensize ?

this is what i have so far but its not working

function screensize(){ $screensize = $_SERVER['HTTP_X_UP_DEVCAP_SCREENPIXELS']; echo "$screensize"; }

screensize();

im noob when it comes to php just started with it please explain the problem in detail thanks

morency Senior · 488 posts #2

where you find this ? HTTP_X_UP_DEVCAP_SCREENPIXELS ? I never heard of anything like this ... :-|

You can get screen size by JavaScript ...
or info from some server variables like

 $_SERVER["HTTP_X_WAP_PROFILE"];
 $_SERVER["HTTP_PROFILE"];
 $_SERVER["HTTP_x"];

Unamos los corazones,hoy todos somos multicolores!

Guest #3
<?php function screensize(){ $screensize = $_SERVER["HTTP_X_WAP_PROFILE"];; echo "$screensize"; } screensize(); ?>

is this right ?

Guest #5

Trust me ive looked but i cant find anything that i understand fully or that works thats why im here asking for help i always ask google first then go onto forums 😉

morency Senior · 488 posts #6

variables posted by me must return a link á.is a page where you find all kind of info about your phone 🙂

Including screen size ...

Added after 6 minutes:

have a look here. Yahoo! Groups

Maybe will work HTTP_UA_PIXELS .. I am from mobile now .. Just try and post here , I am also courious 🙂

Unamos los corazones,hoy todos somos multicolores!

Guest #7
<?php function screensize(){ $screensize = $_SERVER["HTTP_UA_PIXELS"];; echo "$screensize"; } screensize(); ?>

this is what i got back :

Notice: Undefined index: HTTP_UA_PIXELS in C:\wamp\www\killerphp\testing.php on line 4

NoFx wrote:

<?php function screensize(){ $screensize = $_SERVER["HTTP_UA_PIXELS"];; echo "$screensize"; } screensize(); ?>

this is what i got back :

Notice: Undefined index: HTTP_UA_PIXELS in C:\wamp\www\killerphp\testing.php on line 4

<?php function screensize(){ $screensize = $_SERVER["HTTP_UA_PIXELS"]; echo "$screensize"; } screensize(); ?>

Sign in to reply.

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close