在我的网站中,我有一个基于文件的网站验证过程
用户必须在他的根目录中上传一个文件名如下的空文件:
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
一切正常,但我的问题是,这个过程可以被欺骗吗?