Jump to content

Recommended Posts

Hello,

 

Firstly I am only just learning php so please bear with me.

 

What I want to be able to do is for a user to be able to enter a youtube url eg:

http://www.youtube.com/watch?v=8xz7ShMCWls

 

I want the scrip to take the video ID (after watch?v=) and append it into a html embed code for our forums that do not have the feature to auto embed a youtube vid.

 

<p> <img height="350" width="425" class="fw_media_youtube fw-parse" alt="YouTube-AFTER WATCH?V=CODE" src="http://thumbs.webs.com/Platform/mediaPreview.jsp?type=YouTube&id=AFTER WATCH?V=CODE"/></p>

 

Where you see AFTER WATCH?V=CODE is where I want it to place the video id and then return this completed code for the user to copy and paste:

 

<p> <img height="350" width="425" class="fw_media_youtube fw-parse" alt="YouTube-8xz7ShMCWls" src="http://thumbs.webs.com/Platform/mediaPreview.jsp?type=YouTube&id=8xz7ShMCWls"/></p>

 

How would I be able to get this done. I do not expect to be spoon fed but just a litlle help please.

 

Thank you so much if you do help.

Sorry for double post however that script does not include user input. I mean the basis of the script is great and would work. But my problem is I do not know how to take it from the user inputting the url to it dynamically creating the embed code. That script has the video urls already placed in it.

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.