Jump to content

I want php to work with YOUTUBE!!! BRAIN explode()


jeger003

Recommended Posts

hey peeps,

I am trying to get my site to display related youtube videos under the main video

 

here is what i have

$query=mysql_query("SELECT title,mp3ID,youtube_ID FROM songs ORDER BY RAND() LIMIT 10 ") or die("Error Occured");
$left = true;
while($row=mysql_fetch_array($query))
{
if ($left)
{
echo "<tr>";
}
echo "<td align='justify' width='100%' cellspacing='2' cellpadding='2' >";
echo "<td><img src='http://img.youtube.com/vi/".$row['youtube_ID']."/default.jpg'></td>";
echo "<td nowrap><a href='/music.php?id=".$row['mp3ID']."'>".$row['title']."</a></td>";
echo"</td>";
if (!$left)
{
echo"</tr>";
}
$left = !$left;
}
?>

 

this is basic info of how i am able to get youtube video titles and image....i want to use the same youtube.com video ID To get related videos

 

 

please help!!

Link to comment
Share on other sites

The first link provided is your best bet. It is the documentation for the Youtube API.

 

If you can't understand it, well, that's another issue. I suggest instead of looking for a quick fix you actually read through the documentation.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.