getting video ID attribute from youTube url with php


/ Published in: PHP
Save to your folder(s)

taken from comments at above URL


Copy this code and paste it in your HTML
  1. parse_str(parse_url($embedurl,PHP_URL_QUERY), $out);
  2. print_r($out);
  3. echo $out['v']; // return ID of video

URL: http://www.scottklarr.com/topic/415/how-to-grab-thumbnails-for-youtube-and-google-video/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.