çünkü bir arkadaş paylaşmış ama ben denedim olmadı acaba bakabilir misiniz?
neden çalışmıyor?
<?php
$zaman = time();
$video = "http://www.youtube.com/watch?v=YdgNYbbTRkM";
$videoid = explode("v=",$video); // videoid[1]
$baglan = file_get_contents('http://youtube-mp3.org/a/itemInfo/?video_id='.$videoid[1].'');
preg_match('@"h" : "(.*?)"@si',$baglan,$h); // h1 değeri
preg_match('@"title" : "(.*?)"@si',$baglan,$baslik);
$yolla = 'http://youtube-mp3.org/get?video_id='.$videoid[1].'&h='.$h[1].'&r='.$zaman;
dosyaadi = $baslik[1].".mp3";
header("Content - Type: audio/mp3");
header("Content - Disposition: attachment; filename=$dosyaadi");
readfile($yolla);
?>