2 // Implements the del.icio.us API request for all a user's tags.
4 // del.icio.us behavior:
5 // - tags can't have spaces
7 // Force HTTP authentication first!
8 require_once 'httpauth.inc.php';
9 require_once '../header.inc.php';
11 $tagservice =& ServiceFactory::getServiceInstance('TagService');
12 $userservice =& ServiceFactory::getServiceInstance('UserService');
14 // Get the tags relevant to the passed-in variables.
15 $tags =& $tagservice->getTags($userservice->getCurrentUserId());
17 // Set up the XML file and output all the tags.
18 header('Content-Type: text/xml');
19 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
21 foreach ($tags as $row) {
22 echo "\t<tag count=\"". $row['bCount'] .'" tag="'. filter(convertTag($row['tag'], 'out'), 'xml') ."\" />\r\n";