{
{
$time = $time ? $time : time();
$title = $title != '' ? $title : date('F j, Y');
$xml = new SimpleXMLElement('<entry></entry>');
$xml->addAttribute('xmlns', 'http://www.w3.org/2005/Atom');
$xml->addChild('title', $title);
$xml->addChild('summary', $summary);
$xml->addChild('gphoto:location', $location, 'http://schemas.google.com/photos/2007');
$xml->addChild('gphoto:access', $access);
$xml->addChild('gphoto:timestamp', $time);
$media = $xml->addChild('media:group', '', 'http://search.yahoo.com/mrss/');
$media->addChild('media:keywords', implode($keywords, ', '));
$cat = $xml->addChild('category', '');
$cat->addAttribute('scheme', 'http://schemas.google.com/g/2005#kind');
$cat->addAttribute('term', 'http://schemas.google.com/photos/2007#album');
$url = 'https://picasaweb.google.com/data/feed/api/user/' . urlencode($userID);
$jdata = $this->
query($url, $xml->asXML(), array(
'GData-Version' => 2,
'Content-type' =>
'application/atom+xml'),
'post');
$xml = $this->
safeXML($jdata->body);
}
else
{
return false;
}
}