public static function doGet($url, $header = false) { global $LastGETURL; global $LastGETMethod; global $LastHeadersSent; global $last_http_response; global $LastHeadersReceived; $LastGETURL = $url; $LastGETMethod = false; $LastHeadersSent = false; $last_http_response = false; $LastHeadersReceived = false; $lastGETResponse = false; $LastGETMethod = "CURL"; $lastGETResponse = Net::getCurl($url, $header); if ($lastGETResponse !== false) { return $lastGETResponse; } $LastGETMethod = "Stream"; $lastGETResponse = Net::getStream($url, $header); if ($lastGETResponse !== false) { return $lastGETResponse; } error_log("Unable to GET Url={$url}"); error_log("Header: {$header}"); throw new \Exception("Unable to GET url=" . $url); }