Jump to content

[SOLVED] Stripping a Part of the URL


.Darkman

Recommended Posts

Hello Everybody,

 

I am planning to make a site where users can enter a video's url (youtube and such) and the video will be embedded into our site.

 

So i need to know how to strip a part of the url.

 

For eg,

A Youtube's url is  :

 

And the embed code is :

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/hdf4GeT4ELA"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/hdf4GeT4ELA" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>

'

 

I want to separate hdf4GeT4ELA from the URL so that i can use it in the Embed code.

How shall i do is irrespective of whether it is

or

 

That may be pretty simpler.

There is another site called "Grouper" which i am going to allow.

 

Video Url is http://grouper.com/video/MediaDetails.aspx?id=1820852&ml=fpl%3d38714%26fx%3d

 

And the Embed code is

<embed allowScriptAccess="never" allowFullScreen="true"  src="http://grouper.com/mtg/mtgPlayer.swf?v=1.7" width="400" 

height="325" quality="high" scale="noScale" 

FlashVars="ap=0&mu=0&rf=-1&vfver=8&extid=-1&extsite=-1&id=1820852&ml=fpl%3d38714%26fx%3d" 

wmode="window" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" 

type="application/x-shockwave-flash"></embed>

 

How do i remove 1820852 and fpl%3d38714%26fx%3d from this URL.

 

 

Thanks a lot for any help.

Link to comment
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.