This wasn't meant as a "complaint" but merely an observation. Surely, that didn't step on anyone's toes. Or did it? And "Yes" I too donated to the fund.
For those of you who are concerned about connectivity failures (regardless of cause - be it routing or server), the following mod to Shauns source will fix the problem. Note that CURL must be included in your build of PHP.. in most cases it is.. this fix is of course specific to PHP. Where you find this at the beginning of shauns code: if (!function_exists('file_get_contents')) { function file_get_contents($url) { $handle = fopen($url, 'r'); $string = fread($handle, 4096000); fclose($handle); return $string; } } Code (markup): Replace with this: if (!function_exists('file_get_contents')) { function file_get_contents($url) { //Set timeout in secs $timeout=2; //Grab the ad etc $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,$timeout); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $adval=curl_exec($ch); curl_close($ch); return $adval; } } Code (markup): Note that this will, in the event of service outage or ad server down time, result in no ads being shown until connectivity is restored to ad server. Its sole purpose is to provide a timeout, thus avoiding disruption to your site. Cheers, JL
Better still is just use the new ad_network.php file. A 1 second timeout is not really all that practical as there could be factors such as DNS needing to be resolved for example. Another problem with the above code is it only would work if you are using a very old version of PHP (where there is no native file_get_contents() function).