PHP and jQuery functions to return YouTube title from URL

Job ID: 31812905

Budget: £20 – £250 GBP

I require 2 identical functions , one written in PHP and the other in jQuery so it can be called client side. It is OK for the jQuery function to do a server side call to the PHP function to return the value.

The function needs to take a YouTube URL similar to the example below and return its title. The URL can be to any video hosted on YouTube.

For example:
Input URL: https://www.youtube.com/watch?v=uQSoaiubuA0
Return title: Brian Cox explains why time travels in one direction - Wonders of the Universe - BBC Two

I understand this needs to be done using the YouTube API:
https://developers.google.com/youtube/v3/docs

If I provide the API key to my account, will it allow me to get the video title from any account?
Related categories: PHP JavaScript AJAX jQuery / Prototype