Jump to content

Recommended Posts

Hi!

 

$url = "http://www.youtube.com/watch?feature=player_embedded&v=IwPHy17Iu6E";

I have code   

if (preg_match("/http:\/\/www.youtube.com\/watch\?v=([0-9a-zA-Z-_]*)(.*)/i", $url, $matches)) {
        return '<object height="'.$embed_height.'" width="'.$embed_width.'">'.
               '<param name="movie" value="http://www.youtube.com/v/'.$matches[1].'" />'.
               '<param name="wmode" value="transparent" />'.
               '<embed src="http://www.youtube.com/v/'.$matches[1].'&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" height="'.$embed_height.'" width="'.$embed_width.'" />'.
               '</object>';

    }

How to remove feature=player_embedded& from $url ?

Link to comment
https://forums.phpfreaks.com/topic/258795-get-parameter-from-url/
Share on other sites

Take a look at this script I wrote to embed multiple youtube videos from within a bunch of text.

It will handle the shortened youtube.be urls.

I have it fetch the video data from youtube's api also.

Fullscreen works.

 

http://www.phpfreaks.com/forums/index.php?topic=342974.msg1619535#msg1619535

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.