【发布时间】:2014-12-16 13:40:55
【问题描述】:
在我的网站中,我有一个基于文件的网站验证过程
用户必须在其根目录中上传一个空文件,文件名如下:
site-verification-$user_id.html
然后我的脚本使用 php get_headers() 函数来检查这个文件是否存在,例如:
$headers = get_headers( "$user_website/site-verification-$user_id.html" );
if( preg_match( "|200|", $headers[0] ) { // ... website verified
一切正常,但我的问题是,这个过程可以被欺骗吗?
【问题讨论】:
标签: php security web verify get-headers