Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $message = "Big tit's http://www.youtube.com/watch?v=v5V4lc3jaZE&feature=player_embedded&hd=1 :)"
- // youtube, make short url
- $message = preg_replace(
- '#http://(?:www\.)?youtube.com/watch\?v=([0-9A-Za-z-_~]{11})[&=0-9A-Za-z_^]*#i',
- 'http://youtu.be/$1',
- $message
- );
- echo $message;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement