The task
I should upload multiple flv files into youtube service
in background.

In the cms the moderator can decide if a video can be upload or not
in the cideo table I've got all the informatins for the upload
plus a field type enum default no_put named video_status
if the moderator decide don't put the movie video_status is set no_put
if the moderator decide to put the movie video_status is se to_put
on click a xhr request set the video_status to_put
in a cron I retrieve video with flag to_put
and upload them into you service
onsuccess set video_status put
onerror set video_status log_put (for example) and log the error

First I'd like to know your opinion about this set up.
Second I followed the reference and I update this snippet
(I'm going to put this in a loop)
PHP Code:
$yt = new Zend_Gdata_YouTube(getAuthSubHttpClient());
$myVideoEntry = new Zend_Gdata_YouTube_VideoEntry();

$filesource $yt->newMediaFileSource('intro.flv');



$myVideoEntry->setVideoTitle('My Test Movie');
$myVideoEntry->setVideoDescription('My Test Movie');
// Note that category must be a valid YouTube category !

// Set keywords, note that this must be a comma separated string
// and that each keyword cannot contain whitespace
$myVideoEntry->SetVideoTags('cars, funny');

// Optionally set some developer tags

// Optionally set the video's location
$where $yt->newGeoRssWhere();
$position $yt->newGmlPos('37.0 -122.0');
$where->point $yt->newGmlPoint($position);

// Upload URI for the currently authenticated user
$uploadUrl =

// Try to upload the video, catching a Zend_Gdata_App_HttpException
// if availableor just a regular Zend_Gdata_App_Exception

try {
$newEntry $yt->insertEntry($myVideoEntry,
catch (
Zend_Gdata_App_HttpException $httpException) {
/* Manage Error */
echo $httpException->getRawResponseBody();

catch (
Zend_Gdata_App_Exception $e) {
/* Manage Error */
echo $e->getMessage(); 
With this snippet I upload the file into
you tube service.
My trouble is how to check
if a video has been successfully uploaded or not
(I think to manage this in the catch scope /* Manage Error */ ????? )
and retrieve the video entry (like Browser-based upload)?