PHP Youtube Video displaying on page with database -


i'm making "social network" , want able display youtube video when user put in youtube link , description, on facebook. managed make when user put link display video database, can't figure out how not show video when user don't put link , want show youtube video when user put link , description , send database. can help?

update

if(preg_match("/youtube.com(.+)v=([^&]+)/", $url)) {   preg_match("/v=([^&]+)/", $url, $matches);   if(isset($matches[1])) {     $test = 'http://www.youtube.com/embed/'.$matches[1];   } } 

i've found , grabs need , when type like: "link" , text,

how can stop taking after link???


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -