public function hasSupport($requireSsl) { if (!function_exists('file_get_contents')) { return false; } $wrappers = stream_get_wrappers(); if ($requireSsl) { return in_array('https', $wrappers); } return in_array('http', $wrappers); }