In this blog We're gonna see how to set up youtube api environment in php xampp. Google clearly gives the documentation for this
here. But still I'm stuck at the middle somewhere. Because I've never configured this before. So this is absolutely for beginners.
Download the
Google Data Client Library files from the zend website, as we use Zend Gdata for Youtube API. We dont have to install zend framework for this to work. Just download Zend_Gdata from the above link which is located at the bottom of the Zend framework page.
Extract the folder and add the location of the
library
folder to your PHP path. We can set the path by 2 ways. One by using
set_include_path() method and other by using setting path using php.ini file. For me it is located in
C:\xampp\php. Open php.ini and search for
include_path variable. I extracted Zend_Gdata in
C:\xampp\ and rename the folder as ZendGdata.
Now edit the
include_path variable by including this path
C:\xampp\ZendGdata\library. Make sure there is a library folder in that path. Now restart your apache server and test whether the script works by going to this
script. It is installation checker script for this. If all the scripts were passed then it'll show no errors found. I got one error when running this script. It is openssl error. We can solve it by uncommenting
;extension=php_openssl.dll to
extension=php_openssl.dll in php.ini file and restarting the apache server. Then I got no errors.
Now run the demo files in the demo folder of Zend_Gdata folder(copy the demo folder to htdocs folder). Thats It! It'll work like charm!