Forums Register Login
Synchronising with Youtube
I have a task at my hand with 30 hours left.
This is what i have to achieve
I have to create a website where users login into their account.

In this website users are given the functionality to upload their videos own their account(profile).

Now as user upload any video to their account(profile) ,the video should automatically get uploaded to their youtube profile.

I haven`t done anything like this before , can anybody help
Well, if I was given 30 hours for such a task, I'd spend the first 3 hours persuading the other party to extend it by atleast a factor of 5!

Anyway, one of the complex things would be the part where your application has to upload a video into a user's youtube account on his/her behalf.
From a security point of view, it's not at all a good idea for them to give you their youtube passwords.
To solve this problem - uploading a video on behalf of a user but without their password - you'll need to understand the concept of OAuth and how youtube uses it.

And that's not even accounting for all the other moving parts that your own site additionally has to implement.
Thank You for your reply,

I have downloaded ZendGdata-1.12.3 from zend website and unzipped it.

I have put the unzipped ZendGdata-1.12.3(complete directory) in htdocs directory (I am using xampp).

I have also included the path to library in php.ini file as

include_path = ".;E:\xampp\php\PEAR;E:\xampp\htdocs\ZendGdata-1.12.3\library"

but when i run the file InstallationChecker.php(php file to check your installation ,which is given at webpage ) it shows error like not tested .
Please tell what`s going wrong.
From the code in that link, it looks like it must be showing a lot more details about the error than simply "not tested".
What all errors does it show?
It's testing multiple things and any of them could have been aborted for multiple reasons; without all the error information, I can't say.
The output from the script is this

PHP Extension Errors Tested
0 openssl extension missing - refer to http://us.php.net/manual/en/book.openssl.php
Zend Framework Installation Errors Not tested
SSL Capabilities Errors Not tested
YouTube API Connectivity Errors Not tested

What I think the problem is , even When I am editing the php.ini file I think it still does not make those changes.

Because when I run one of the demos from the ZendGdata like Docs.php it gives these same warning and error

Warning: require_once(Zend\Loader.php) [function.require-once]: failed to open stream: No such file or directory in E:\xampp\htdocs\index.php on line 42

Fatal error: require_once() [function.require]: Failed opening required 'Zend\Loader.php' (include_path='.;E:\xampp\php\PEAR') in E:\xampp\htdocs\index.php on line 42

Even though I have edited the include_path in php.ini to include E:\xampp\htdocs\ZendGdata-1.12.3\library , but it seems include_path is same even after making the change .

Can you tell how to enable the extension php_openssl.dll
I searched through the web and tried but its not working.
Here is what I done

php_openssl.dll is present in E:\xampp\php\ext

Since there is nothing like extension=php_openssl.dll in my php.ini I add this line

saved ,exit and restarted the xampp but still its not working

And my extension_dir=E:\xampp\php\ext

Can you help?
It should work
That's the right way to enable an extension. However, make sure you're doing it in the right php.ini. If I remember right, there is one in xampp\apache\bin too and that's the one that's loaded, not the one in xampp\php
Everything is working just fine except one thing.
When i try to upload video to youtube I get this error.

ERROR Expected response code 200, got 403
Invalid format for header X-GData-Key

I have copied my developerkey in the index.php file under YoutubeVideoApp

$_SESSION['developerKey'] = 'AI39si4EPTh-90SIO4BVLjZN75UZAgr2cwhVHSzIzUrhkwIPkDXiNoLRuXiHGjcCfjq7UhNrpF0WBZAsa2D6JchzqW9QH77W0A1';

Does I have to make any other changes in the file or files.

I'm not familiar with "ZendGdata" framework or how it sends across the youtube developer key when making requests.
Perhaps you can try to find some logging option to dump what HTTP requests and headers it's sending across.
I'm still in control here. LOOK at this tiny ad!
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter

This thread has been viewed 1724 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 18, 2018 15:09:36.