Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $search = '/\<a(.+)href="https:\/\/(.+)(?:www\.)?((?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch(.+)v=))([\w\-]{10,12})).youtube\"(.+)<\/a>/i';
- $replace = '<iframe width="250" height="150" src="http://www.youtube-nocookie.com/embed/$5"></iframe>';
- $content = preg_replace($search, $replace, $content);
Advertisement
Add Comment
Please, Sign In to add comment