Recently one of my developer facing some problem to find out the solution for valid youtube video. So I have write one small API for this in PHP. PHP API to check is valid youtube video is basically a small PHP based API to check valid youtube video url.

In this API I have created three functions. One function is to get the video ID from the video url, called getYoutubeURLID($ytURL), second will check that provided ID is valid or not, called isYTValidIDCheck($ytId) and last but the most important function is isYTValidURL($ytURL), which will control the complete API. This function contain all the API constant and work like controller of this API.

Download Link   Demo Link