①PHPのみで製作することは可能か
可能です。
②初心者でも作れそうな物なのか
TCP/IPで取得できるものをTCP/IPで取得するだけですので、難易度としては大したことはないでしょう。
適法性については判例がないと思いますので司法判断になるとは思います。法うんぬん以前にYouTubeの利用規約でコンテンツをダウンロードすることや配布することは禁止されていますが、「ダウンロードすることができるツールを公開すること」(ダウンロード等の行為はツールの利用者が行う)がこれに抵触するかどうかも当事者判断か、これも司法判断かなと思います。
サービスプロバイダであるGoogleからの訴訟となった場合はUSの法にもとづく訴訟になるのではないかなと思います。各コンテンツの権利保有者からの訴訟 (著作権侵害など) となった場合は侵害した側の属する国の法が基準になることが多いようです。法曹ではないので話半分くらいにとどめておいていただければと思いますが。
Permissions and Restrictions
You may access and use the Service as made available to you, as long as you comply with this Agreement and applicable law. You may view or listen to Content for your personal, non-commercial use. You may also show YouTube videos through the embeddable YouTube player.
The following restrictions apply to your use of the Service. You are not allowed to:
- access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as expressly authorized by the Service; or (b) with prior written permission from YouTube and, if applicable, the respective rights holders;
引用元: Terms of Service - YouTube ([JST]2020-Jul-8 8:00 p.m.現在)、太字は引用者註