posted 11 years ago
Here's PHP Recipe 27 from my book, The Web Developer's Cookbook:
This recipe takes the YouTube ID of a video and the parameters required to display it to your requirements. The default dimensions are 480 x 385. The recipe accepts these arguments:
• $id A YouTube video ID such as “VjnygQ02aW4”
• $width The display width
• $height The display height
• $high If set to 1 enable high quality display, if available
• $full If set to 1 enable the video to play in full screen mode
• $auto If set to 1 start the video playing automatically on page load