Advertisement
hmbashar

Copy ID from youtube video url

Sep 10th, 2018
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.18 KB | None | 0 0
  1. <?php
  2. $videourl = "http://www.youtube.com/watch?v=C4kxS1ksqtw&feature=relate";
  3. parse_str( parse_url( $videourl, PHP_URL_QUERY ), $my_array_of_vars );
  4. echo $my_array_of_vars['v'];
  5. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement