有没有办法让 W3C 一致性检查器通过我的 php 安全性?
我想让 W3C 在我为会员页面设置此功能时通过我的网页安全性,
if (!isset($_SESSION['logged'], $_SESSION['layout'])) {
header('Location ...............');
.............
}
每当我动态地将链接添加到我的网页以便能够检查它时,显然我的页面会将检查器重定向回注册页面。有没有办法让我知道请求来自 W3C html5 一致性检查器,例如,
if (isset($_POST['W3Cchecker'])) {
let the script run
}
I would like to let W3C through my webpage security at the minute I have this for member pages,
if (!isset($_SESSION['logged'], $_SESSION['layout'])) {
header('Location ...............');
.............
}
Whenever I dynamically add the link to my webpages to be able to check it obviously my pages redirect the checker back to the signup page. Is there a way I can tell the request is coming from W3C html5 conformance checker like,
if (isset($_POST['W3Cchecker'])) {
let the script run
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不安全,不。
您用来检测 W3C 站点的任何内容都可能被恶意用户伪造(可能除了 IP 地址,但您不想这样做)。
您可以托管/保存站点的第二个相同副本(没有您想要保护的任何内容)并针对该副本运行验证器,或者您可以运行您自己的验证器程序副本,并进行修改以对其进行身份验证。
Not securely, no.
Anything that you use to detect the W3C site could be forged by a malicious user (save possibly for IP address, but you don't want to do that).
You could host/save a second, identical copy of your site (sans whatever content you're trying to protect) and run the validator against that, or you could run your own copy of the validator program, modified to authenticate itself.