I’ve a input form which i want to post a youtube video link. For example:
http://www.youtube.com/watch?v=0MMNsUgaUd0&NR=1&feature=endscreen
or
http://youtu.be/0MMNsUgaUd0
So, whatever link i provided in the input box it’s should be show a video on my website. How can i do this with php.
Any Idea?
use preg_replace (http://php.net/manual/en/function.preg-replace.php) this will search the youtube url and replace with youtube object code.