function _categoryList($blogid, $username, $password) { // 1. login $mem = new MEMBER(); if (!$mem->login($username, $password)) { return _error(1, "Could not log in"); } // check if on team and blog exists if (!BLOG::existsID($blogid)) { return _error(2, "No such blog ({$blogid})"); } if (!$mem->teamRights($blogid)) { return _error(3, "Not a team member"); } $b = new BLOG($blogid); $categorystruct = array(); $query = "SELECT cname, cdesc, catid" . ' FROM ' . sql_table('category') . " WHERE cblog=" . intval($blogid) . " ORDER BY cname"; $r = sql_query($query); while ($obj = sql_fetch_object($r)) { $categorystruct[$obj->cname] = new xmlrpcval(array("description" => new xmlrpcval($obj->cdesc, "string"), "htmlUrl" => new xmlrpcval($b->getURL() . "?catid=" . $obj->catid, "string"), "rssUrl" => new xmlrpcval("", "string")), 'struct'); } return new xmlrpcresp(new xmlrpcval($categorystruct, "struct")); }
public function pingBloggDe() { $b = new BLOG($this->myBlogId); $message = new xmlrpcmsg('bloggUpdates.ping', array(new xmlrpcval($b->getName(), 'string'), new xmlrpcval($b->getURL(), 'string'))); $c = new xmlrpc_client('/', 'xmlrpc.blogg.de', 80); //$c->setDebug(1); // 30 seconds timeout... $r = $c->send($message, 30); return $this->processPingResult($r); }
function event_PostAddItem($data) { if ($this->draft == "no" && $this->podcast == true && $this->getOption('ping') == "yes") { $b = new BLOG($this->myBlogId); if (!class_exists('xmlrpcmsg')) { global $DIR_LIBS; include $DIR_LIBS . 'xmlrpc.inc.php'; } $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($b->getName(), 'string'), new xmlrpcval($b->getURL(), 'string'))); $c = new xmlrpc_client('/RPC2', 'audiorpc.weblogs.com', 80); //$c->setDebug(1); $r = $c->send($message, 15); // 15 seconds timeout... $m = new xmlrpc_client('/pingserver.php', 'mcierror.axisz.jp', 80); $r = $m->send($message, 15); } }