<?php
if(!$_GET["screenX"]) {
echo '
<script>
location = location.href+"?screenX="+screen.width+"&screenY="+screen.height;
</script>
';
exit;
}
$screenX = $_GET["screenX"];
$screenY = $_GET["screenY"];
?>
if(!$_GET["screenX"]) {
echo '
<script>
location = location.href+"?screenX="+screen.width+"&screenY="+screen.height;
</script>
';
exit;
}
$screenX = $_GET["screenX"];
$screenY = $_GET["screenY"];
?>
本文介绍了一段简单的PHP代码,该代码用于获取用户浏览器的屏幕宽度和高度。通过URL参数传递这些信息,可以便于开发者在服务器端记录用户的设备信息。
508

被折叠的 条评论
为什么被折叠?



