'https://raw.', '.git' => '/master/' . $file, ]); return @file_get_contents($https); } /** * @param $endpoint * @param $file * @return string */ private static function getBitBucket($endpoint, $file) { $https = strtr($endpoint, [ 'git://' => 'https://', '.git' => '/raw/master/' . $file, ]); return @file_get_contents($https); } }