title: How to get YouTube Videos Description and Comments with Youtube Api in php
body: <p>I am working on a YouTube project, in which i am getting data from YouTube by RSS, I am getting title only with RSS, now I want to get description and comments of that specific video. I have tried many methods but none of them is working for me, except one but that is not giving me description and comments it’s just returning me name, height width, video url, author etc
  Codes that I tried are given bellow 
  This code is working but not returning what I need</p>
  
  <pre><code>$youtube = "http://www.youtube.com/oembed?url=". $src_url_r ."&amp;format=json";
  $curl = curl_init($youtube);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  $return = curl_exec($curl);
  curl_close($curl);
  $tst = json_decode($return, true);
  </code></pre>
  
  <p>Other code that i tried and not working are</p>
  
  <pre><code>$id = substr(get_post_meta(get_the_ID(), 'rss_pi_source_url', TRUE), strrpos(get_post_meta(get_the_ID(), 'rss_pi_source_url', TRUE), '=') + 1);
  
          //echo "https://gdata.youtube.com/feeds/api/videos/".$id."?v=2&amp;alt=json";
          $json_output = file_get_contents("http://gdata.youtube.com/feeds/api/videos/".$src_url."?v=2&amp;alt=json");
          $json = json_decode($json_output, true);
  
          //This gives you the video description
          $video_description = $json['entry']['media$group']['media$description']['$t'];
  
          //This gives you the video views count
          $view_count = $json['entry']['yt$statistics']['viewCount'];
  
          //This gives you the video title
          $video_title = $json['entry']['title']['$t'];
  </code></pre>
  
  <p>this is an other piecec of code that is not working  </p>
  
  <pre><code>$json_output = file_get_contents("https://www.googleapis.com/youtube/v3/videos?part=snippet&amp;id=0KNk-Joi-NM&amp;key=my_api_key");
              $json = json_decode($json_output, true);
              print_r($json);
  </code></pre>
  
  <p>Please any one guide me</p>