<?php
ob_start();
$chanel = "kanaladı";
$apiKey = "apikey";
$chanelAdress = "https://www.googleapis.com/youtube/v3/channels?part=contentDetails&id=". $chanel ."&key=". $apiKey;
$chanelVeri = json_decode(file_get_contents($chanelAdress));
$chanelID = $chanelVeri->items[0]->id;
$videoAdres = "https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=". $chanelID ."&eventType=live&type=video&key=". $apiKey;
$videoVeri = json_decode(file_get_contents($videoAdres));
$yenivideoID = $videoVeri->items[0]->id->videoId;
echo '<iframe width="640" height="360" id="medine" src="https://www.youtube.com/embed/'. $yenivideoID .'" frameborder="0" allowfullscreen></iframe>';
?>
Böyle bir kod buldum ama çalıştıramadım
canlı video derken? ücretsiz api kullanım kaynak kodları atabilirim yarın kendi yaptığım.
Çok iyi olur hocam şimdiden teşekkürler