'PHP How to check removed blog in 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...



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 John Svensson