I want to get Video ID for YouTube or Vimeo via its Embed code or from URL, Any solution to do this with PHP ?
According to the latest youtube standard, you can use following code to extract video id from embed code.
$embed = ''; preg_match('~embed/(.*?)"~', $embed, $output); echo $output[1];
Thank you