Jump to content

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

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.