PHP - Merhaba arkadaslar, oncelikle hepinize kolay gelsin.
mp3.mid.az/download/782
Boyle bir adres var elimde, bu anresin yonlendirdigi mp3 dosyasinin tam adresini nasil alabilirim?
Simdiden hepinize cok tesekkur ederim, hayirli aksamlar..
Mp3 adresini almak |
4 Mesajlar | 1.092 Okunma |
function SearchString($First, $Last, $Text)
{
@preg_match_all('/' . preg_quote($First, '/').'(.*?)'. preg_quote($Last, '/').'/i', $Text, $m);
return @$m[1];
}
function GetURL($URL){
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, true);
$Response = curl_exec($ch);
$URL = SearchString("Location: ", "Vary", str_replace("\n", NULL, $Response));
return $URL[0];
}
echo GetURL("https://mp3.mid.az/download/782");
?>
function SearchString($First, $Last, $Text)
{
@preg_match_all('/' . preg_quote($First, '/').'(.*?)'. preg_quote($Last, '/').'/i', $Text, $m);
return @$m[1];
}
function GetURL($URL){
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, true);
$Response = curl_exec($ch);
$URL = SearchString("Location: ", "Vary", str_replace("\n", NULL, $Response));
return $URL[0];
}
echo GetURL("https://mp3.mid.az/download/782");
?>