Best way of detecting if a web service is online / offline with PHP
<p>I've found various methods:</p>

<ul>
<li><a href="http://stackoverflow.com/questions/3404885/check-serverlist-offline-online-php">Check serverlist offline / online PHP</a></li>
<li><a href="http://css-tricks.com/snippets/php/check-if-website-is-available/" rel="nofollow">http://css-tricks.com/snippets/php/check-if-website-is-available/</a></li>
</ul>

<p>But was curious on the best / most efficient to use or any alternatives.</p>

<p>I'm using the yahoo currency API for my script and I want to add a fallback API incase the yahoo currency goes down. <strong>How can I detect this?</strong></p>
