views:

44

answers:

1

I'm one of the developers of TryAgain, an add-on for Firefox that keeps trying to load a webpage when the server cannot be reached.

A user recently suggested having the add-on check if the website you're trying to reach is down, or just blocked for the local machine. I was therefore hopeful that there might be a website similar to downforeveryoneorjustme.com that has some kind of API that could be used to poll a domain to see if it is accessible to the greater public.

I've tried contacting downforeveryoneorjustme.com and Uptime Auditor, but neither have responded. Does anybody have other ideas?

+1  A: 

If you only need simple functionality to verify whether the site is visible to the some service (ex. http://downforeveryoneorjustme.com), I think the API is not necessary, you can simply get:

http://downforeveryoneorjustme.com/aaa.google.com

And check if in response you can find:

<title>It's not just you!</title>

or:

<title>It's just you.</title>

For example in unix-like environments you can do something like this:

wget -q -O - http://downforeveryoneorjustme.com/aaa.google.com |grep "It's not just you" 

And check exit code. Maybe you should do something similar in your code?

Maciej Kucharz
I was hoping to avoid this, because I'd have to release a new version of the add-on (and have it reviewed) if the owner of downfor decides to make a minor change to the text. It's also slightly slower. Nevertheless a good suggestion, and definitely the solution I'll go for if no API is available.
Paul Lammertsma
This is definitely not a "most beautiful" solution, but if there is no API it is quite simple to implement and change if necessary.
Maciej Kucharz
I've implemented this solution. A previous version is still pending review, but as soon as it is approved, I will submit the version that queries downforeveryoneorjustme.com.
Paul Lammertsma