<?php
function extrairHostPorIndice($url){
// Extraí tudo que estiver depois das duas primeiras barras "//"
// Extraí tudo que estiver antes da primeira barra "/"
// Retorna o resultado
return $antes;
}
$url = "https://docs.google.com/uc?id=0B7zY19LCJa8XeXZtWklZbFBEVG8&export=download";
$site = extrairHostPorIndice($url);
echo $site . "\n";
PD9waHAKCmZ1bmN0aW9uIGV4dHJhaXJIb3N0UG9ySW5kaWNlKCR1cmwpewoJLy8gRXh0cmHDrSB0dWRvIHF1ZSBlc3RpdmVyIGRlcG9pcyBkYXMgZHVhcyBwcmltZWlyYXMgYmFycmFzICIvLyIKCSRkZXBvaXMgID0gc3Vic3RyKCR1cmwsIHN0cnBvcygkdXJsLCAiLy8iKSArIHN0cmxlbigiLy8iKSk7CgkKCS8vIEV4dHJhw60gdHVkbyBxdWUgZXN0aXZlciBhbnRlcyBkYSBwcmltZWlyYSBiYXJyYSAiLyIKCSRhbnRlcyA9IHN1YnN0cigkZGVwb2lzLCAwLCBzdHJwb3MoJGRlcG9pcywgIi8iKSk7CgkKCS8vIFJldG9ybmEgbyByZXN1bHRhZG8KCXJldHVybiAkYW50ZXM7Cn0KCiR1cmwgID0gImh0dHBzOi8vZG9jcy5nb29nbGUuY29tL3VjP2lkPTBCN3pZMTlMQ0phOFhlWFp0V2tsWmJGQkVWRzgmZXhwb3J0PWRvd25sb2FkIjsKJHNpdGUgPSBleHRyYWlySG9zdFBvckluZGljZSgkdXJsKTsKCmVjaG8gJHNpdGUgLiAiXG4iOw==