video id lerini bir file.txt dosyasina kayit edersin.
<?php
$dosya = file("file.txt");
$ras = rand(1,20);
$id=$dosya[$ras];
echo "<object width=\"425\" height=\"350\"><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/".$id."&autoplay=1&rel=0\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed></object>";
?>
şeklinde olabilir.