我想检查博客状态,活跃或删除。
Active blog:
http://novisadcats.blogspot.com/
Removed blog:
http://cityofangell.blogspot.com/
Removed blog, but available to register:
http://madhouseofporn.blogspot.com/
我正在尝试使用 phpget_headers();
我可以检查该博客是否处于活动状态或已删除,但是如何检查博客状态是否已删除但可以注册?
示例结果:
Active blog:
$headers = get_headers("http://novisadcats.blogspot.com/");
echo $headers[12]; // HTTP/1.0 200 OK
Removed blog:
$headers = get_headers("http://cityofangell.blogspot.com/");
echo $headers[12]; // HTTP/1.0 404 Not Found
Removed blog, but available to regsiter:
$headers = get_headers("http://madhouseofporn.blogspot.com/");
echo $headers[12]; // HTTP/1.0 404 Not Found
感谢帮助...