diff options
author | Dave Tosh <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-20 16:38:49 +0000 |
---|---|---|
committer | Dave Tosh <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-20 16:38:49 +0000 |
commit | 0e36ccecce1423bbb1cd4f5df32e45ab8f66ecb8 (patch) | |
tree | 8755f2298450844738a228ab338985f1792d6728 | |
parent | d332f44cb46df6fd8691307f392519a37a7e2535 (diff) | |
download | elgg-0e36ccecce1423bbb1cd4f5df32e45ab8f66ecb8.tar.gz elgg-0e36ccecce1423bbb1cd4f5df32e45ab8f66ecb8.tar.bz2 |
xml parsing error on youtube titles/desc fixed
git-svn-id: http://code.elgg.org@6113 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | actions/add.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actions/add.php b/actions/add.php index a8a3f2905..528e65269 100644 --- a/actions/add.php +++ b/actions/add.php @@ -32,23 +32,23 @@ if($page_owner->type == "group") { require_once(dirname(dirname(__FILE__)) . "/models/lib/class.vimeo.php"); function fetchyoutubeDatatitle($videoid){ - $buffer = file_get_contents('http://www.youtube.com/api2_rest?method=youtube.videos.get_details&dev_id=rG48P7iz0eo&video_id='.$videoid); + $buffer = file_get_contents('http://gdata.youtube.com/feeds/api/videos/'.$videoid); /** ** generate XML View **/ $xml_buffer = new SimpleXMLElement($buffer); - $vidDataTitle = $xml_buffer->video_details->title; + $vidDataTitle = $xml_buffer->title; return $vidDataTitle; //return ""; } function fetchyoutubeDatadesc($videoid){ - $buffer = file_get_contents('http://www.youtube.com/api2_rest?method=youtube.videos.get_details&dev_id=rG48P7iz0eo&video_id='.$videoid); + $buffer = file_get_contents('http://gdata.youtube.com/feeds/api/videos/'.$videoid); /** ** generate XML View **/ $xml_buffer = new SimpleXMLElement($buffer); - $vidDataDesc = $xml_buffer->video_details->description; + $vidDataDesc = $xml_buffer->content; return $vidDataDesc; //return ""; } |