summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHorus32014-02-24 19:09:58 +0100
committerHorus32014-02-24 19:09:58 +0100
commitb869d66e44095bc7ac5e4cbd2dde2ef9217a65df (patch)
tree4f7e22b729f6243232e16443c59fd5b137fdb0ea
parent6d0a5d7096e0aee3dcb1a41a0f6c57a38876c821 (diff)
downloadrandom-b869d66e44095bc7ac5e4cbd2dde2ef9217a65df.tar.gz
.
-rw-r--r--www/youtube.php10
-rw-r--r--www/zend_init.php2
2 files changed, 5 insertions, 7 deletions
diff --git a/www/youtube.php b/www/youtube.php
index 13829fa..0843299 100644
--- a/www/youtube.php
+++ b/www/youtube.php
@@ -1,11 +1,11 @@
<?php
-include("zend_init.php");
+require("zend_init.php");
-function getAndPrintVideoFeed($location = Zend_Gdata_YouTube::VIDEO_URI)
+function getAndPrintVideoFeed($location, $yt)
{
-$yt = new Zend_Gdata_YouTube();
-$yt->setMajorProtocolVersion(2);
+//$yt = new Zend_Gdata_YouTube();
+//$yt->setMajorProtocolVersion(2);
$videoFeed = $yt->getVideoFeed($location);
printVideoFeed($videoFeed);
@@ -79,7 +79,7 @@ function get_video(){
return $string;
}
-getAndPrintVideoFeed();
+getAndPrintVideoFeed($location = Zend_Gdata_YouTube::VIDEO_URI, $yt);
$searchstring = get_video();
diff --git a/www/zend_init.php b/www/zend_init.php
index 3089906..abfad93 100644
--- a/www/zend_init.php
+++ b/www/zend_init.php
@@ -6,5 +6,3 @@ require_once 'Zend/Loader.php'; // the Zend dir must be in your include_path
Zend_Loader::loadClass('Zend_Gdata_YouTube');
$yt = new Zend_Gdata_YouTube();
$yt->setMajorProtocolVersion(2);
-
-return $yt;