dongyoulou4829 2015-10-02 09:11
浏览 84

PHP如何检查blogspot中删除的博客?

I want to check blog status, active or removed.

Active blog:
http://novisadcats.blogspot.com/  

Removed blog:
http://cityofangell.blogspot.com/

Removed blog, but available to register:
http://madhouseofporn.blogspot.com/

I am trying to use php get_headers(); I can check if that blog is active or removed, but how to check if blog status is removed but available to register?

Example Results:

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

Thanks for help...

  • 写回答

1条回答 默认 最新

  • dqn8235 2015-10-02 09:28
    关注

    You have 4 option(s)

    1. Check manually.
    2. Make an assumption that if an url returns 404 it may be available.
    3. You can try crawl the homepage and see if it returns an "Ok" when the domain has been entered. This can be done using a tool such as DomCrawler Component (http://symfony.com/doc/current/components/dom_crawler.html)
    4. The "hack"-ish way. Probably should not be done. Find the "URL" that Blogger requests when they check the domain availability (Google Chrome Developer tool, Network tracking) and try simulate the request from your end.

    However I would probably go ahead and ask Support about this, and ask if there is a way to check, or if any of the options above are okay to do.

    评论

报告相同问题?

悬赏问题

  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来