I am using direct-upload method to upload video to youtube. Video successfully uploads but i can’t get the video id after upload process finished.
try {
$newEntry = $yt->insertEntry($myVideoEntry, $uploadUrl, 'Zend_Gdata_YouTube_VideoEntry');
$v_id = $newEntry->getVideoId();
mysql_query("UPDATE `mytable` SET youtube_video_id = '$v_id' WHERE ID = '$tid'");
} catch (Zend_Gdata_App_HttpException $httpException) {
echo $httpException->getRawResponseBody();
} catch (Zend_Gdata_App_Exception $e) {
echo $e->getMessage();
}
this $v_id is returning EMPTY after upload.
anyone knows how to get the video id properly ?
Thanks
EDIT:
I Found the problem. It was all about mysql server. it has gone away everytime when i want to insert youtube video ID. I just did a mysql_ping and it solved.
I Found the problem. It was all about mysql server. it has gone away everytime when i want to insert youtube video ID. I just did a mysql_ping and it solved.