I am making a program that will upload video to my youtube channel by any user. But it generates error. My code is as follows:-
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_YouTube');
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_App_Exception');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
$authenticationURL= 'https://www.google.com/accounts/ClientLogin';
$client = "";
$email = 'theprofessional1992@gmail.com';
$passwd = '*******************';
try {
$client = Zend_Gdata_ClientLogin::getHttpClient($email, $passwd, 'cl');
} catch (Zend_Gdata_App_CaptchaRequiredException $cre) {
echo 'URL of CAPTCHA image: ' . $cre->getCaptchaUrl() . "\n";
echo 'Token ID: ' . $cre->getCaptchaToken() . "\n";
} catch (Zend_Gdata_App_AuthException $ae) {
echo 'Problem authenticating: ' . $ae->exception() . "\n";
}
Error :- Notice: Undefined offset: 1 in C:\wamp\www\Yt\zdata\demos\Zend\Gdata\YouTubeVideoApp\Zend\Gdata\ClientLogin.php on line 150
Even i don't know how this functionality will be made.
Please any help ?