cyberhost Posted September 5, 2011 Share Posted September 5, 2011 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. Link to comment https://forums.phpfreaks.com/topic/246492-how-can-i-take-user-input-and-append-it-to-a-url/ Share on other sites More sharing options...
QuickOldCar Posted September 5, 2011 Share Posted September 5, 2011 http://www.phpfreaks.com/forums/index.php?topic=342974.msg1618361#msg1618361 Link to comment https://forums.phpfreaks.com/topic/246492-how-can-i-take-user-input-and-append-it-to-a-url/#findComment-1265713 Share on other sites More sharing options...
cyberhost Posted September 5, 2011 Author Share Posted September 5, 2011 http://www.phpfreaks.com/forums/index.php?topic=342974.msg1618361#msg1618361 Thank you VERY much Link to comment https://forums.phpfreaks.com/topic/246492-how-can-i-take-user-input-and-append-it-to-a-url/#findComment-1265719 Share on other sites More sharing options...
cyberhost Posted September 5, 2011 Author Share Posted September 5, 2011 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. Link to comment https://forums.phpfreaks.com/topic/246492-how-can-i-take-user-input-and-append-it-to-a-url/#findComment-1265725 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.