can php detect client browser monitor size/resolution?

前端 未结 8 1158
一生所求
一生所求 2020-12-20 16:20

Php can detect IP, hostname, client agent etc. Can php detect client browser monitor size/resolution?

8条回答
  •  醉酒成梦
    2020-12-20 16:44

    You'll have to use PHP together with JavaScript, like in this example:

    $url = $_SERVER['PHP_SELF'];
    
    if( isset($HTTP_COOKIE_VARS["res"]) )
        $res = $HTTP_COOKIE_VARS["res"];
    
    else {
        ?>
        
        
        Your screen resolution is " . $width . " by " . $height . ".
    The width/height of this table is " . $tb_width . " by " . $tb_height . ". ");

提交回复
热议问题