I have a script that allows to grab videos from YouTube. However, it doesn't work if I use short URLs.
I think the problem is caused by the code that gets YouTube Id from URLs. Here are the lines I think are responsible for that:
$youtube_url = $_POST['file'];
$ParseUrl = parse_url($youtube_url);
parse_str($ParseUrl['query'], $youtube_url_prop);
$YouTubeId = isset($youtube_url_prop['v']) ? $youtube_url_prop['v'] : '';
I'm a newbie so first I would like to make sure that this is the code I should focus on.
If it so I hope someone can advice me how to change that lines to get YouTube Id also from short URLs.
Cheers.