For college project I was building simple website. One of future was share youtube video I used iFrame, but it not worked. simple two lines fixed problem:
$videoUrl = full video url from browser $video = str_replace("https:","",$videoUrl); $video = str_replace("watch?v=","embed/",$video); echo '<iframe height="315" src="'.$video.'" width="420"></iframe>';Maybe it will be useful for somebody.
No comments:
Post a Comment