Tag Archives: youtube

PHP : Resize embedded video

$video = stripslashes($embedded_video_code);

$video = preg_replace('~(]*width\s?=\s?["\'])[^"\']+(["\'])~i', '${1}300${2}', $video);

$video = preg_replace('~(]*height\s?=\s?["\'])[^"\']+(["\'])~i', '${1}200${2}', $video);