I want to make a PHP script that parse ANY youtube link/url and makes an output of iframe that i can later store in SQL database and insert on my site.
Any help appreciated
EDIT & ANSWEAR
1) get video ID
$step1=explode('v=', $url); $step2 =explode('&',$step1[1]); $vedio_id = $step2[0];
2) create iframe
<iframe width="320" height="240" src="http://www.youtube.com/embed/'. $vedio_id.'?autoplay=1" frameborder="0"></iframe>