Given a link from youtube
e.g. http://www.youtube.com/watch?v=XHs99iVpnXU
how do I extract the video id (the v parameter) without it being affected by other parameters such as feature=
e.g. http://www.youtube.com/watch?v=XHs99iVpnXU&feature=watch&fullscrenn=true
?
parse_str(parse_url($url, PHP_URL_QUERY), $variables)
print $variables['v'];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With