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.

    评论

报告相同问题?

悬赏问题

  • ¥15 VB.NET2022如何生成发布成exe文件
  • ¥30 matlab appdesigner私有函数嵌套整合
  • ¥15 给我一个openharmony跑通webrtc实现视频会议的简单demo项目,sdk为12
  • ¥15 vb6.0使用jmail接收smtp邮件并另存附件到D盘
  • ¥30 vb net 使用 sendMessage 如何输入鼠标坐标
  • ¥15 关于freesurfer使用freeview可视化的问题
  • ¥100 谁能在荣耀自带系统MagicOS版本下,隐藏手机桌面图标?
  • ¥15 求SC-LIWC词典!
  • ¥20 有关esp8266连接阿里云
  • ¥15 C# 调用Bartender打印机打印