My shipping company has an "API" which instructs me to use file_get_contents() in order to receive a shipping quote.
$zipcode=1234;
$volume=2;
$shipping_quote=file_get_contents(http://www.shipping.com?z=$zipcode&v=$volume);
Occasionally, their server will be down and I will receive no response. Is there someway to check if file_get_contents has made a connection? I am getting "failed to open stream errors". Instead of these, I would like to be able to present my users with a meaningful response "Server busy, Try again".