Embedding a YouTube Video Based on a PHP Variable

Posted by jeffpm on Stack Overflow See other posts from Stack Overflow or by jeffpm
Published on 2010-03-26T17:06:29Z Indexed on 2010/03/26 17:13 UTC
Read the original article Hit count: 348

Filed under:
|
|
|
|

I have a website that I am creating for a class project. The website shows information about bands (which is stored in a mysql database). I am trying to spruce up the site a bit, and I would like to embed a YouTube video based on the band's name. Say, for instance, I have "Led Zeppelin" stored in my database. How can I take a PHP variable containing "Led Zeppelin", search YouTube using that variable, find a random video, and then embed that in the website? From the research I've done, it seems you can only embed YouTube videos if you know the exact address of the video. Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about html