XtGem Forum catalog
$value) { fwrite($adzmob_request, "AB_$name: $value\r "); } fwrite($adzmob_request, "\r "); $adzmob_info = stream_get_meta_data($adzmob_request); $adzmob_timeout = $adzmob_info['timed_out']; $adzmob_contents = ""; $adzmob_body = false; $adzmob_head = ""; while (!feof($adzmob_request) && !$adzmob_timeout) { $adzmob_line = fgets($adzmob_request); if(!$adzmob_body && $adzmob_line == "\r ") $adzmob_body = true; if(!$adzmob_body) $adzmob_head .= $adzmob_line; if($adzmob_body && !empty($adzmob_line)) $adzmob_contents .= $adzmob_line; $adzmob_info = stream_get_meta_data($adzmob_request); $adzmob_timeout = $adzmob_info['timed_out']; } fclose($adzmob_request); if (!preg_match('/^HTTP\/1\.\d 200 OK/', $adzmob_head)) $adzmob_timeout = true; if($adzmob_timeout) return ""; return $adzmob_contents; } } ?>