You can get an array of SD, HD download links of a YouTube video by pasting its link or ID into the function getVideoYoutube($link)
<?php
include ('getlink.php'); //Includes the functions file.
$link = "https://www.youtube.com/watch?v=YuIvDyPUC3g"; //Link of the YouTube video you want to GET
getVideoYoutube($link); //Call the function
//Yep, simple as fuck
?>