in reply to [untitled node, ID 176516]

To follow up on that explanation, LWP::Simple's head() method is a very easy and economical way of testing a URL since it uses a HEAD request which does not actually send the document body around. To further facilitate the approach, you should issue a redirect to either the cam URL or the "sorry it's down" picture from the CGI depending on the test result, if it's being referred to via IMG SRC=. If the CGI's output is the cam portal's HTML page it should produce IMG SRC= tags with different URLs according to the tests' results. That way the CGI script does as little work as possible, to keep the server's load low.

Makeshifts last the longest.