title: Retrieve YouTube video details, including description from video URL using PHP?
body: <p>After searching stackoverflow, I've found: <a href="https://stackoverflow.com/questions/10896233/how-can-i-retrieve-youtube-video-details-from-video-url-using-php">How can I retrieve YouTube video details from video URL using PHP?</a></p>
  
  <p>using the following code (I have changed to https instead of http and also added $_GET['v'] for getting video code from browser URL):</p>
  
  <pre><code>function get_youtube($url) {
  
   $youtube = "https://www.youtube.com/oembed?url=". $url ."&amp;format=json";
  
   $curl = curl_init($youtube);
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
   $return = curl_exec($curl);
   curl_close($curl);
   return json_decode($return, true);
  
  }
  
  $url = 'https://www.youtube.com/watch?v=' . $_GET['v'];
  
  // Display Data 
  echo '&lt;pre&gt;';
  print_r(get_youtube($url));
  echo '&lt;/pre&gt;';
  </code></pre>
  
  <p>I was able to get the following result:</p>
  
  <pre><code>Array
  (
      [thumbnail_url] =&gt; https://i.ytimg.com/vi/AhN5MbTJ0pk/hqdefault.jpg
      [version] =&gt; 1.0
      [type] =&gt; video
      [html] =&gt; &lt;iframe width="480" height="270" src="https://www.youtube.com/embed/AhN5MbTJ0pk?feature=oembed" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
      [provider_url] =&gt; https://www.youtube.com/
      [thumbnail_width] =&gt; 480
      [width] =&gt; 480
      [thumbnail_height] =&gt; 360
      [author_url] =&gt; https://www.youtube.com/user/AndreasChoice
      [author_name] =&gt; AndreasChoice
      [title] =&gt; GROSS SMOOTHIE CHALLENGE! ft. Tealaxx2
      [height] =&gt; 270
      [provider_name] =&gt; YouTube
  )
  </code></pre>
  
  <p>Which is great, but I also need to retrieve the full 'description' of the video that is missing. How can I achieve this? Thank you.</p>