Jump to content

Youtube video


waynew

Recommended Posts

Ok, I'm creating a niche social network as a personal project and want to allows users to be able to add a Youtube video to their profile. Now I had originally gone with the following code, but alas, it doesn't seem to work. Just a blank embedded object.

 

<?php 
if($user_details['youtube_video'] != NULL){
echo '<div id="youtube">';
echo '<object width="400" height="324"><param name="movie" value="'.$user_details['youtube_video'].'&hl=en&fs=1&color1=0xe1600f&color2=0xfebd01"></param><param name="allowFullScreen" value="true"></param><embed src="'.$user_details['youtube_video'].'&hl=en&fs=1&color1=0xe1600f&color2=0xfebd01" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object>';
echo '</div>';
}
?>

I am not allowing users to embed their own objects etc, for the obvious reasons. So, is there anyway that would allow users to simply paste a Youtube video URL in and have it play with the player I picked?

Link to comment
https://forums.phpfreaks.com/topic/121408-youtube-video/
Share on other sites

i remember one time that youtube works a little different i don't think you have to enter the link in the address bar to play the video, i think its the unique video name but it plays it in something like player.swf

 

i remember because in bebo before you could enter youtube videos you had a hack where you enter the player.swf thing and it would play them.

Link to comment
https://forums.phpfreaks.com/topic/121408-youtube-video/#findComment-626073
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.