970_90

Monday, 2 March 2015

Get Youtube video-details and comments using PHP

Get Youtube video-details and comments using PHP

How to get youtube video detail in Zend (Response in JSON)
$uTubeVideoCode ='ryJReIcMGOs';        
        $jsonData='';
        try{            
            $client = new Zend_Http_Client("http://gdata.youtube.com/feeds/api/videos/{$uTubeVideoCode}?v=2&alt=json");
            $response = $client->request('GET');
            $jsonData = $response->getBody();
        
        }  catch (Exception $e){
            echo "Error:".$e->getMessage();
            
        }    
        echo $jsonData;die;

Output:
{"version":"1.0","encoding":"UTF-8","entry":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$gd":"http://schemas.google.com/g/2005","xmlns$yt":"http://gdata.youtube.com/schemas/2007","xmlns$media":"http://search.yahoo.com/mrss/","gd$etag":"W/\"CkACQn47eCp7I2A9XRRWEkU.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs"},"published":{"$t":"2015-02-22T05:17:46.000Z"},"updated":{"$t":"2015-03-02T07:19:23.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#video"},{"scheme":"http://gdata.youtube.com/schemas/2007/categories.cat","term":"People","label":"People & Blogs"}],"title":{"$t":"ICC Cricket World Cup 2015 India Vs South Africa Game 13 Highlights - IND VS SA 22/02/15 2015"},"content":{"type":"application/x-shockwave-flash","src":"http://www.youtube.com/v/ryJReIcMGOs?version=3&f=videos&app=youtube_gdata"},"link":[{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs&feature=youtube_gdata"},{"rel":"http://gdata.youtube.com/schemas/2007#video.related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/related?v=2"},{"rel":"http://gdata.youtube.com/schemas/2007#mobile","type":"text/html","href":"http://m.youtube.com/details?v=ryJReIcMGOs"},{"rel":"http://gdata.youtube.com/schemas/2007#uploader","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/users/ZBJOTQ3A-HYLRmpYm4hDeA?v=2"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"}],"author":[{"name":{"$t":"SGZ Cricket"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/SGZCricket"},"yt$userId":{"$t":"ZBJOTQ3A-HYLRmpYm4hDeA"}}],"yt$accessControl":[{"action":"comment","permission":"allowed"},{"action":"commentVote","permission":"allowed"},{"action":"videoRespond","permission":"moderated"},{"action":"rate","permission":"allowed"},{"action":"embed","permission":"allowed"},{"action":"list","permission":"allowed"},{"action":"autoPlay","permission":"allowed"},{"action":"syndicate","permission":"allowed"}],"gd$comments":{"gd$feedLink":{"rel":"http://gdata.youtube.com/schemas/2007#comments","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments?v=2","countHint":32}},"yt$hd":{},"media$group":{"media$category":[{"$t":"People","label":"People & Blogs","scheme":"http://gdata.youtube.com/schemas/2007/categories.cat"}],"media$content":[{"url":"http://www.youtube.com/v/ryJReIcMGOs?version=3&f=videos&app=youtube_gdata","type":"application/x-shockwave-flash","medium":"video","isDefault":"true","expression":"full","duration":1544,"yt$format":5},{"url":"rtsp://r4---sn-a5m7zu7s.c.youtube.com/CiILENy73wIaGQnrGAyHeFEirxMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp","type":"video/3gpp","medium":"video","expression":"full","duration":1544,"yt$format":1},{"url":"rtsp://r4---sn-a5m7zu7s.c.youtube.com/CiILENy73wIaGQnrGAyHeFEirxMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp","type":"video/3gpp","medium":"video","expression":"full","duration":1544,"yt$format":6}],"media$credit":[{"$t":"sgzcricket","role":"uploader","scheme":"urn:youtube","yt$display":"SGZ Cricket","yt$type":"partner"}],"media$description":{"$t":"ICC Cricket World Cup 2015 India Vs South Africa Game 13 Highlights - IND VS SA 22/02/15 2015\n\nICC Cricket World Cup 2015 India Vs Pakistan Game 4 Highlights - IND VS PAK 15/2/15\n\nICC Cricket World Cup 2015 India Vs South Africa\nICC Cricket World Cup 2015 India Vs South Africa 2/22/15\nICC Cricket World Cup 2015 India Vs South Africa 22 February 2015\n\nSubscribe For More Videos : https://www.youtube.com/user/SGZCricket\nGoogle + : https://plus.google.com/u/0/b/1093080...\n\nExtra Tag : ICC Cricket World Cup 2015 India Vs South Africa 2/22/15 ICC Cricket World Cup 2015 India Vs South Africa 2/22/15 2015 ICC Cricket World Cup 2015 India Vs South Africa 2/22/15 Full Match ICC Cricket World Cup 2015 India Vs South Africa 2/22/15 Highlights ICC Cricket World Cup 2015 India Vs South Africa 02/22/15 Full Results","type":"plain"},"media$keywords":{},"media$license":{"$t":"youtube","type":"text/html","href":"http://www.youtube.com/t/terms"},"media$player":{"url":"http://www.youtube.com/watch?v=ryJReIcMGOs&feature=youtube_gdata_player"},"media$thumbnail":[{"url":"http://i.ytimg.com/vi/ryJReIcMGOs/default.jpg","height":90,"width":120,"time":"00:12:52","yt$name":"default"},{"url":"http://i.ytimg.com/vi/ryJReIcMGOs/mqdefault.jpg","height":180,"width":320,"yt$name":"mqdefault"},{"url":"http://i.ytimg.com/vi/ryJReIcMGOs/hqdefault.jpg","height":360,"width":480,"yt$name":"hqdefault"},{"url":"http://i.ytimg.com/vi/ryJReIcMGOs/sddefault.jpg","height":480,"width":640,"yt$name":"sddefault"},{"url":"http://i.ytimg.com/vi/ryJReIcMGOs/1.jpg","height":90,"width":120,"time":"00:06:26","yt$name":"start"},{"url":"http://i.ytimg.com/vi/ryJReIcMGOs/2.jpg","height":90,"width":120,"time":"00:12:52","yt$name":"middle"},{"url":"http://i.ytimg.com/vi/ryJReIcMGOs/3.jpg","height":90,"width":120,"time":"00:19:18","yt$name":"end"}],"media$title":{"$t":"ICC Cricket World Cup 2015 India Vs South Africa Game 13 Highlights - IND VS SA 22/02/15 2015","type":"plain"},"yt$aspectRatio":{"$t":"widescreen"},"yt$duration":{"seconds":"1544"},"yt$uploaded":{"$t":"2015-02-22T05:17:46.000Z"},"yt$uploaderId":{"$t":"UCZBJOTQ3A-HYLRmpYm4hDeA"},"yt$videoid":{"$t":"ryJReIcMGOs"}},"gd$rating":{"average":1.6350245,"max":5,"min":1,"numRaters":1222,"rel":"http://schemas.google.com/g/2005#overall"},"yt$statistics":{"favoriteCount":"0","viewCount":"397572"},"yt$rating":{"numDislikes":"1028","numLikes":"194"}}}


How to get youtube video comments in Zend(Response in JSON)
        $uTubeVideoCode ='ryJReIcMGOs';        
        $jsonData='';
        try{            
            $client = new Zend_Http_Client("http://gdata.youtube.com/feeds/api/videos/{$uTubeVideoCode}/comments?v=2&alt=json");
            $response = $client->request('GET');
            $jsonData = $response->getBody();
        
        }  catch (Exception $e){
            echo "Error:".$e->getMessage();
            
        } 
echo $jsonData;  

Output:


{"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$gd":"http://schemas.google.com/g/2005","xmlns$openSearch":"http://a9.com/-/spec/opensearch/1.1/","xmlns$yt":"http://gdata.youtube.com/schemas/2007","gd$etag":"W/\"CUYAQ3kzfCp7I2A9XRRWEkU.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comments"},"updated":{"$t":"2015-03-02T07:59:02.784Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"logo":{"$t":"http://www.gstatic.com/youtube/img/logo.png"},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments?v=2"},{"rel":"http://schemas.google.com/g/2005#batch","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/batch?v=2"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments?alt=json&max-results=25&v=2"},{"rel":"service","type":"application/atomsvc+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments?alt=atom-service&v=2"}],"author":[{"name":{"$t":"YouTube"},"uri":{"$t":"http://www.youtube.com/"}}],"generator":{"$t":"YouTube data API","version":"2.1","uri":"http://gdata.youtube.com"},"openSearch$totalResults":{"$t":21},"openSearch$itemsPerPage":{"$t":25},"entry":[{"gd$etag":"W/\"AkQDRX47eCp7I2A9XRRXFk0.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z13yynd4ssvaubg4n04cf3sytyaijddqwkc0k"},"published":{"$t":"2015-02-22T12:32:54.000Z"},"updated":{"$t":"2015-02-22T12:32:54.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"woooooooooooooooow\ufeff"},"content":{"$t":"woooooooooooooooow\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z13yynd4ssvaubg4n04cf3sytyaijddqwkc0k?v=2"}],"author":[{"name":{"$t":"Rujul Deshpande"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/lIx3u1pJAyoxSMT2YAoEjg"},"yt$userId":{"$t":"lIx3u1pJAyoxSMT2YAoEjg"}}],"yt$channelId":{"$t":"UClIx3u1pJAyoxSMT2YAoEjg"},"yt$googlePlusUserId":{"$t":"102896019321279244010"},"yt$replyCount":{"$t":1},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"C04NRH47eCp7I2A9XRRXFko.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z12oh5xbdqmmtdgii04ce33x5xz1xz3yrag"},"published":{"$t":"2015-02-23T06:13:15.000Z"},"updated":{"$t":"2015-02-23T06:13:15.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"can someone tell me ..."},"content":{"$t":"can someone tell me which game is this???\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z12oh5xbdqmmtdgii04ce33x5xz1xz3yrag?v=2"}],"author":[{"name":{"$t":"sajan sebastian"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/xzNmG-CxBF8AkMEtmtaCOw"},"yt$userId":{"$t":"xzNmG-CxBF8AkMEtmtaCOw"}}],"yt$channelId":{"$t":"UCxzNmG-CxBF8AkMEtmtaCOw"},"yt$googlePlusUserId":{"$t":"116346366931114012924"},"yt$replyCount":{"$t":1},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"D0IDQn47eCp7I2A9XRRXF0s.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z13hexfyzsigv5fd322qez1xupbbyvnee"},"published":{"$t":"2015-02-24T08:12:53.000Z"},"updated":{"$t":"2015-02-24T08:12:53.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"SGZ cricket..... ..."},"content":{"$t":"SGZ cricket..... grow up...\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z13hexfyzsigv5fd322qez1xupbbyvnee?v=2"}],"author":[{"name":{"$t":"Roshan More"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/mZCY2FMCPkNn8RdNlPf0ww"},"yt$userId":{"$t":"mZCY2FMCPkNn8RdNlPf0ww"}}],"yt$channelId":{"$t":"UCmZCY2FMCPkNn8RdNlPf0ww"},"yt$googlePlusUserId":{"$t":"101759163693693799937"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"AkYFQX47eCp7I2A9XRRWEE8.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z12yf5libtipzjki104cenrhvobhyftj2lk0k"},"published":{"$t":"2015-02-27T09:08:30.000Z"},"updated":{"$t":"2015-02-27T09:08:30.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"In this World cup ..."},"content":{"$t":"In this World cup each and every matches are interesting but only match \nschesule is not perfect ....\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z12yf5libtipzjki104cenrhvobhyftj2lk0k?v=2"}],"author":[{"name":{"$t":"Nikunj Goletar"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/Shu6BVmlTRMgS_HtaB9yzQ"},"yt$userId":{"$t":"Shu6BVmlTRMgS_HtaB9yzQ"}}],"yt$channelId":{"$t":"UCShu6BVmlTRMgS_HtaB9yzQ"},"yt$googlePlusUserId":{"$t":"108529240828297091468"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"DUYGQX47eCp7I2A9XRRXFk0.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z13juluxpmepddgrr04cjb2gnvvfhndyzp00k"},"published":{"$t":"2015-02-22T12:12:00.000Z"},"updated":{"$t":"2015-02-22T12:12:00.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"may i know the name ..."},"content":{"$t":"may i know the name of the game\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z13juluxpmepddgrr04cjb2gnvvfhndyzp00k?v=2"}],"author":[{"name":{"$t":"Gopinath V"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/tamilanxxx"},"yt$userId":{"$t":"9Qu8ceBfkJ9txoCO3k3ENw"}}],"yt$channelId":{"$t":"UC9Qu8ceBfkJ9txoCO3k3ENw"},"yt$googlePlusUserId":{"$t":"115360643619137243306"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"CUMBRH47eCp7I2A9XRRWEE4.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z13oyzgwvlroujxzu04cjjryjpyzwnmil54"},"published":{"$t":"2015-02-27T10:37:35.000Z"},"updated":{"$t":"2015-02-27T10:37:35.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"woooooooooooooooow\ufeff"},"content":{"$t":"woooooooooooooooow\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z13oyzgwvlroujxzu04cjjryjpyzwnmil54?v=2"}],"author":[{"name":{"$t":"Husnain shah"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/__NO_YOUTUBE_ACCOUNT__"},"yt$userId":{"$t":"__NO_YOUTUBE_ACCOUNT__"}}],"yt$channelId":{"$t":"UC__NO_YOUTUBE_ACCOUNT__"},"yt$googlePlusUserId":{"$t":"113607893143655172508"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"C0MDSX47eCp7I2A9XRRWEko.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z13mfpo41z3jebh2v22ggr5xtuqvyn2eo"},"published":{"$t":"2015-03-02T04:44:38.000Z"},"updated":{"$t":"2015-03-02T04:44:38.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"congrates\ufeff"},"content":{"$t":"congrates\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z13mfpo41z3jebh2v22ggr5xtuqvyn2eo?v=2"}],"author":[{"name":{"$t":"Amol Awasthi"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/THBPSc-ik_m440Djkhe0ew"},"yt$userId":{"$t":"THBPSc-ik_m440Djkhe0ew"}}],"yt$channelId":{"$t":"UCTHBPSc-ik_m440Djkhe0ew"},"yt$googlePlusUserId":{"$t":"118383318670254507980"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"DUMERn47eCp7I2A9XRRWEE8.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z13bs11qzp2kjvpsj22ecvjb5ouvh1ilb"},"published":{"$t":"2015-02-27T08:56:47.000Z"},"updated":{"$t":"2015-02-27T08:56:47.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"haha you are the ..."},"content":{"$t":"haha you are the world fellow ever\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z13bs11qzp2kjvpsj22ecvjb5ouvh1ilb?v=2"}],"author":[{"name":{"$t":"nani98663"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/nani98663"},"yt$userId":{"$t":"_oMue9jTfGX75AQUxeceiw"}}],"yt$channelId":{"$t":"UC_oMue9jTfGX75AQUxeceiw"},"yt$googlePlusUserId":{"$t":"115292334965355156920"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"DkYMQX47eCp7I2A9XRRXGEQ.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z12th1ditzvedbxsp22kxxlzeuucfbrcw"},"published":{"$t":"2015-02-25T19:56:20.000Z"},"updated":{"$t":"2015-02-25T19:56:20.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"seriously grow up ..."},"content":{"$t":"seriously grow up man\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z12th1ditzvedbxsp22kxxlzeuucfbrcw?v=2"}],"author":[{"name":{"$t":"Ishan Shinde"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/5nefuBa-wS5dlh9mthIsQQ"},"yt$userId":{"$t":"5nefuBa-wS5dlh9mthIsQQ"}}],"yt$channelId":{"$t":"UC5nefuBa-wS5dlh9mthIsQQ"},"yt$googlePlusUserId":{"$t":"115372824146721655757"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"A0YNSX47eCp7I2A9XRRXF00.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z13pgp5yirr0wtxik04civwpimrcerapvek"},"published":{"$t":"2015-02-23T16:33:18.000Z"},"updated":{"$t":"2015-02-23T16:33:18.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"hell no.... how ..."},"content":{"$t":"hell no.... how interesting....lol\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z13pgp5yirr0wtxik04civwpimrcerapvek?v=2"}],"author":[{"name":{"$t":"Darshan Jain"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/TmQQ8VHwustduwHXiLowWg"},"yt$userId":{"$t":"TmQQ8VHwustduwHXiLowWg"}}],"yt$channelId":{"$t":"UCTmQQ8VHwustduwHXiLowWg"},"yt$googlePlusUserId":{"$t":"116504884552174068967"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"DEMER347eCp7I2A9XRRXGEQ.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z13utrm4zyjgwd20n22tfnzqzvuehh5lc"},"published":{"$t":"2015-02-25T20:33:26.000Z"},"updated":{"$t":"2015-02-25T20:33:26.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"Grow up friend\ufeff"},"content":{"$t":"Grow up friend\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z13utrm4zyjgwd20n22tfnzqzvuehh5lc?v=2"}],"author":[{"name":{"$t":"abhijit kulkarni"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/abhijit0727"},"yt$userId":{"$t":"NWvmyhNFs1B8ljeaQXES1A"}}],"yt$channelId":{"$t":"UCNWvmyhNFs1B8ljeaQXES1A"},"yt$googlePlusUserId":{"$t":"105890333904958496583"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"D04DQ347eCp7I2A9XRRXF08.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z12wxpvrlofxc5s0w23ownp4doe4wrx4r04"},"published":{"$t":"2015-02-23T21:12:52.000Z"},"updated":{"$t":"2015-02-23T21:12:52.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"wow the crowd sucks ..."},"content":{"$t":"wow the crowd sucks in this game\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z12wxpvrlofxc5s0w23ownp4doe4wrx4r04?v=2"}],"author":[{"name":{"$t":"Mehul Shukla"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/mehulshukla04"},"yt$userId":{"$t":"xu8mQo6LHTGfYAG-j7mNug"}}],"yt$channelId":{"$t":"UCxu8mQo6LHTGfYAG-j7mNug"},"yt$googlePlusUserId":{"$t":"105925848190989770553"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"A08BQ347eCp7I2A9XRRXF0g.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z12wf3irhvr5sbbjq04ccx4rtz24yveq25k"},"published":{"$t":"2015-02-24T06:37:32.000Z"},"updated":{"$t":"2015-02-24T06:37:32.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"can u tell the name ..."},"content":{"$t":"can u tell the name of the game plss??????\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z12wf3irhvr5sbbjq04ccx4rtz24yveq25k?v=2"}],"author":[{"name":{"$t":"nikhil kulal"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/HZacepyCMUAS5AzaKPImwA"},"yt$userId":{"$t":"HZacepyCMUAS5AzaKPImwA"}}],"yt$channelId":{"$t":"UCHZacepyCMUAS5AzaKPImwA"},"yt$googlePlusUserId":{"$t":"103284323473829074041"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"D04FRX47eCp7I2A9XRRXFkQ.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z125irwomybbexbvj23dwxqgbtbdyf0nc"},"published":{"$t":"2015-02-23T12:51:54.000Z"},"updated":{"$t":"2015-02-23T12:51:54.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"woow vata game\ufeff"},"content":{"$t":"woow vata game\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z125irwomybbexbvj23dwxqgbtbdyf0nc?v=2"}],"author":[{"name":{"$t":"pradeep appu"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/7j-ZZrFk6CylNMihVsV1vQ"},"yt$userId":{"$t":"7j-ZZrFk6CylNMihVsV1vQ"}}],"yt$channelId":{"$t":"UC7j-ZZrFk6CylNMihVsV1vQ"},"yt$googlePlusUserId":{"$t":"116605829416262485807"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"AkUNQn47eCp7I2A9XRRWEEo.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z121c51wuquciznns230yxnorkb2x34ai04"},"published":{"$t":"2015-02-27T23:04:53.000Z"},"updated":{"$t":"2015-02-27T23:04:53.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"superhero..indian . ..."},"content":{"$t":"superhero..indian ..jai ho\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z121c51wuquciznns230yxnorkb2x34ai04?v=2"}],"author":[{"name":{"$t":"chupbhosari terabaap"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/80XYP3ohlonHxFjyJxMg9w"},"yt$userId":{"$t":"80XYP3ohlonHxFjyJxMg9w"}}],"yt$channelId":{"$t":"UC80XYP3ohlonHxFjyJxMg9w"},"yt$googlePlusUserId":{"$t":"107946096902915779887"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"AkEGR347eCp7I2A9XRRXFkQ.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z13scpvijxithh0lm23dxpa5vkzsw50a304"},"published":{"$t":"2015-02-23T13:37:06.000Z"},"updated":{"$t":"2015-02-23T13:37:06.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"good\ufeff"},"content":{"$t":"good\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z13scpvijxithh0lm23dxpa5vkzsw50a304?v=2"}],"author":[{"name":{"$t":"Maha Linagam"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/mali4991"},"yt$userId":{"$t":"4NyMEDI3PVTVEM9Fga-K5Q"}}],"yt$channelId":{"$t":"UC4NyMEDI3PVTVEM9Fga-K5Q"},"yt$googlePlusUserId":{"$t":"103431499595674948971"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"DUAFRH47eCp7I2A9XRRXF00.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z12nxdegiqzecxljo04chvn4dkzmuvwgdr00k"},"published":{"$t":"2015-02-23T16:08:35.000Z"},"updated":{"$t":"2015-02-23T16:08:35.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"dafuq is this???\ufeff"},"content":{"$t":"dafuq is this???\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z12nxdegiqzecxljo04chvn4dkzmuvwgdr00k?v=2"}],"author":[{"name":{"$t":"Katherine May"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/Vvt17yrrm4cwZT5HakoHFw"},"yt$userId":{"$t":"Vvt17yrrm4cwZT5HakoHFw"}}],"yt$channelId":{"$t":"UCVvt17yrrm4cwZT5HakoHFw"},"yt$googlePlusUserId":{"$t":"105114308315934876966"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"CkIDSH47eCp7I2A9XRRXGUg.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z12detpbmozjc5dms23csd4rkyvgsvnok04"},"published":{"$t":"2015-02-26T11:36:19.000Z"},"updated":{"$t":"2015-02-26T11:36:19.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":""},"content":{"$t":""},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z12detpbmozjc5dms23csd4rkyvgsvnok04?v=2"}],"author":[{"name":{"$t":"Ashokkumar T"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/3kFgr6i5Ugr7aIYEZvU-Iw"},"yt$userId":{"$t":"3kFgr6i5Ugr7aIYEZvU-Iw"}}],"yt$channelId":{"$t":"UC3kFgr6i5Ugr7aIYEZvU-Iw"},"yt$googlePlusUserId":{"$t":"101665337513199560569"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}},{"gd$etag":"W/\"C0ANQn47eCp7I2A9XRRWEUQ.\"","id":{"$t":"tag:youtube.com,2008:video:ryJReIcMGOs:comment:z12uy31y3weyelzop04cgnoyloukhpvrcrs0k"},"published":{"$t":"2015-03-01T06:36:33.000Z"},"updated":{"$t":"2015-03-01T06:36:33.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://gdata.youtube.com/schemas/2007#comment"}],"title":{"$t":"New inspiring song ..."},"content":{"$t":"New inspiring song for team india to win the world cup\nhttps://www.youtube.com/watch?v=vxNf1m2SiY0\ufeff"},"link":[{"rel":"related","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs?v=2"},{"rel":"alternate","type":"text/html","href":"http://www.youtube.com/watch?v=ryJReIcMGOs"},{"rel":"self","type":"application/atom+xml","href":"http://gdata.youtube.com/feeds/api/videos/ryJReIcMGOs/comments/z12uy31y3weyelzop04cgnoyloukhpvrcrs0k?v=2"}],"author":[{"name":{"$t":"Kumar K"},"uri":{"$t":"http://gdata.youtube.com/feeds/api/users/X0WlKnTMzGDgVDZ4TmWujQ"},"yt$userId":{"$t":"X0WlKnTMzGDgVDZ4TmWujQ"}}],"yt$channelId":{"$t":"UCX0WlKnTMzGDgVDZ4TmWujQ"},"yt$googlePlusUserId":{"$t":"116638980038801195984"},"yt$replyCount":{"$t":0},"yt$videoid":{"$t":"ryJReIcMGOs"}}]}}


Best Related Posts are Following:
1. How to send Email in Zend Framework - HTML Email
2. Send Email from Gmail SMTP using Zend Framework
3. Google trends api php - How to get hot trends
4. Multiple column ordering in Zend Framework
5. Current time zone for a city- Free API
6. Zend Gdata Youtube API - Search Video - View Video Detail
7. Download Videos from Amazon S3 - PHP
8. How to set Cron in Zend Framework
9. Zend Cache Tutorial - Zend Framework 1.12
10. Zend Framework Interview Questions and Answers for Experienced

2 comments:

  1. Question: How to get the Profile Picture by Username?
    Suppose we have following details
    username: lIx3u1pJAyoxSMT2YAoEjg
    userId: 102896019321279244010

    Thanks in Advance
    Rajat

    ReplyDelete
  2. Use below API
    http://gdata.youtube.com/feeds/api/users/lIx3u1pJAyoxSMT2YAoEjg?fields=yt:username,media:thumbnail,title&alt=json-in-script&format=5&callback=showYouTubeProfilePicture

    and create a javascript function
    function showYouTubeProfilePicture(data){
    //update user pics div
    }

    ReplyDelete