Foros del Web » Soporte técnico » Audio y vídeo »

Subiendo un video con el api de you tobe

Estas en el tema de Subiendo un video con el api de you tobe en el foro de Audio y vídeo en Foros del Web. hola amigos estoy trantando de impletar el api de youtobe para subir y alojar videos en you tobe desde mi pagina la idea es que ...
  #1 (permalink)  
Antiguo 30/07/2010, 16:52
 
Fecha de Ingreso: octubre-2009
Mensajes: 68
Antigüedad: 14 años, 6 meses
Puntos: 1
Subiendo un video con el api de you tobe

hola amigos estoy trantando de impletar el api de youtobe para subir y alojar videos en you tobe desde mi pagina la idea es que en mi blog un usuario pueda subir y ver el video.
Encontre este codigo pero me bota varios errores
ayuda por favor
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<?
if(isset($_POST['enviar']))
{

$dir = "library/Zend/Gdata/App/";
$file=$_POST["video"];
$file=$dir.$file;
$titulo="Upload: ....."." ";
$desc="Upload: ....."." ";
$tags="test1,test2";
require_once 'library/Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_YouTube');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
$developerKey = 'Key de desarrollador de youtobe';
$authenticationURL= 'https://www.google.com/youtube/accounts/ClientLogin';
$httpClient =
Zend_Gdata_ClientLogin::getHttpClient(
$username = 'usuario',
$password = 'xxxx',
$service = 'youtube',
$client = null,
$source = 'MySource',
$loginToken = null,
$loginCaptcha = null,
$authenticationURL);
$yt = new Zend_Gdata_YouTube($httpClient, $applicationId, $clientId, $developerKey);
$myVideoEntry = new Zend_Gdata_YouTube_VideoEntry();
$filesource = $yt->newMediaFileSource($file);
$filesource->setContentType('video/quicktime');
$filesource->setSlug($file);
$myVideoEntry->setMediaSource($filesource);
$myVideoEntry->setVideoTitle($titulo);
$myVideoEntry->setVideoDescription($desc);
$myVideoEntry->setVideoCategory('Autos');
$myVideoEntry->SetVideoTags($tags);
$myVideoEntry->setVideoDeveloperTags(array('mydevtag', 'anotherdevtag'));
$yt->registerPackage('Zend_Gdata_Geo');
$yt->registerPackage('Zend_Gdata_Geo_Extension');
$uploadUrl = 'http://uploads.gdata.youtube.com/feeds/users/default/uploads';





try {
$newEntry = $yt->insertEntry( $myVideoEntry, $uploadUrl, 'Zend_Gdata_YouTube_VideoEntry');
}
catch (Zend_Gdata_App_HttpException $httpException) {
echo $httpException->getRawResponseBody();
}
catch (Zend_Gdata_App_Exception $e) {
echo $e->getMessage();
}
}
?>
<form name = 'form1' action = '' method = 'post' enctype='multipart/form-data'>
<input type='file' name='video' size='40'></p>
<input name='enviar' type='hidden' value='enviar'>
<input type = 'submit' name='enviar' id='enviar' value = 'subir' />
</form>

</body>
</html>


Los errores
Warning: Zend_Loader::include_once(Zend/Gdata/YouTube.php) [zend-loader.include-once]: failed to open stream: No such file or directory in /www/aplicaciones/redescuela2/general/blog/library/Zend/Loader.php on line 146

Warning: Zend_Loader::include_once() [function.include]: Failed opening 'Zend/Gdata/YouTube.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /www/aplicaciones/redescuela2/general/blog/library/Zend/Loader.php on line 146

Warning: Zend_Loader::require_once(Zend/Exception.php) [zend-loader.require-once]: failed to open stream: No such file or directory in /www/aplicaciones/redescuela2/general/blog/library/Zend/Loader.php on line 98

Fatal error: Zend_Loader::require_once() [function.require]: Failed opening required 'Zend/Exception.php' (include_path='.:/usr/share/php:/usr/share/pear') in /www/aplicaciones/redescuela2/general/blog/library/Zend/Loader.php on line 98
ya tengo la libreria zend en el servidor
  #2 (permalink)  
Antiguo 02/05/2011, 00:55
Avatar de Filgood  
Fecha de Ingreso: octubre-2008
Mensajes: 87
Antigüedad: 15 años, 6 meses
Puntos: 1
Respuesta: Subiendo un video con el api de you tobe

Hola, ¿ ya tienes instalado el zend en tu servidor ?

Etiquetas: api, video
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:01.