I need a class called Youtube. This class should be able to fetch video info (length, name of the video, user that uploaded it, the data that it was uploaded , so a few basic get Functions).
This class should also fetch all the available video qualities:
- a function to get all the download links for a video as an array with the format and quality being in the array name, so example: array["mp4_360"] would return mp4 format and 360p quality.
- a function to download the file, so you just readfile($link) with the correct header parameters.