2013-11-16, 00:09:57
Make an array of yt ids , loop them, use it to store titles or descriptions if you want.
Then have the link pass it via querystring to a video page ises its own ID to get the video id ( to avoid querystring poisoning attacks ) and then do your thing.
the rest is basic web design, same page list if not a videoid else show video etc.
this is not functioning code
Then have the link pass it via querystring to a video page ises its own ID to get the video id ( to avoid querystring poisoning attacks ) and then do your thing.
the rest is basic web design, same page list if not a videoid else show video etc.
this is not functioning code
PHP Code:
$array = array(
'video1' => array('123412342','title','description'),
...
);
// show a list
foreach($array as $video){
echo "<a href=\"url?videoid=".$video[0]."\">".$video[1]."</a></br>";
}
// video page
if isset($_get['videoid']){
embed blah blah videourl?$array[$_get['videoid']][0]
}