myBlogId = $data['blog']->blogid; $this->myPostTitle = $data['title']; } function supportsFeature($what) { switch($what) { case 'SqlTablePrefix': return 1; default: return 0; } } function install() { $this->createOption('pingpong_pingomatic','Ping-o-matic','yesno','yes'); // Default, pinging Ping-o-Matic meta-ping service $this->createOption('pingpong_blogs','Blo.gs','yesno','no'); $this->createOption('pingpong_euroweblog','EuroWeblog','yesno','no'); $this->createOption('pingpong_weblogues','Weblogues','yesno','no'); $this->createOption('pingpong_bloggde',"Blogg.de",'yesno','no'); $this->createOption('pingpong_technorati',"Technorati",'yesno','no'); $this->createOption('pingpong_blogrolling',"Blogrolling",'yesno','no'); } function pingBloGs() { $b = new BLOG($this->myBlogId); $message = new xmlrpcmsg( 'weblogUpdates.extendedPing', array( new xmlrpcval($b->getName(),'string'), new xmlrpcval($b->getURL(),'string'), )); $c = new xmlrpc_client('/', 'ping.blo.gs', 80); // $c->setDebug(1); $r = $c->send($message,15); // 15 seconds timeout... } function pingEuroWeblog() { $b = new BLOG($this->myBlogId); $message = new xmlrpcmsg( 'weblogUpdates.ping', array( new xmlrpcval($b->getName(),'string'), new xmlrpcval($b->getURL(),'string'), )); $c = new xmlrpc_client('/RPC2', 'rcs.datashed.net', 80); // $c->setDebug(1); $r = $c->send($message,15); // 15 seconds timeout... } function pingWebloguesDotCom() { $b = new BLOG($this->myBlogId); $message = new xmlrpcmsg( 'weblogUpdates.extendedPing', array( new xmlrpcval($b->getName(),'string'), // your blog title new xmlrpcval($b->getURL(),'string'), // your blog url )); $c = new xmlrpc_client('/RPC/', 'www.weblogues.com', 80); // $c->setDebug(1); $r = $c->send($message,15); // 15 seconds timeout... } function pingPing() { $b = new BLOG($this->myBlogId); $message = new xmlrpcmsg( 'weblogUpdates.ping', array( new xmlrpcval($b->getName(),'string'), new xmlrpcval($b->getURL(),'string'), )); $c = new xmlrpc_client('/', 'rpc.pingomatic.com', 80); // $c->setDebug(1); $r = $c->send($message,15); // 15 seconds timeout... } 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); $r = $c->send($message,15); // 15 seconds timeout... } function pingTechnorati() { $b = new BLOG($this->myBlogId); $message = new xmlrpcmsg( 'weblogUpdates.ping', array( new xmlrpcval($b->getName(),'string'), new xmlrpcval($b->getURL(),'string'), )); $c = new xmlrpc_client('/rpc/ping', 'rpc.technorati.com', 80); // $c->setDebug(1); $r = $c->send($message,15); // 15 seconds timeout... } function pingBlogRollingDotCom() { $b = new BLOG($this->myBlogId); $message = new xmlrpcmsg( 'weblogUpdates.ping', array( new xmlrpcval($b->getName(),'string'), // your blog title new xmlrpcval($b->getURL(),'string'), // your blog url new xmlrpcval('changesurl='+$this->altUrl,'string'), // alternative url new xmlrpcval('categoryname=\"'+$this->cat+'\"','string'))); // your category name $c = new xmlrpc_client('/pinger/', 'rpc.blogrolling.com', 80); // $c->setDebug(1); $r = $c->send($message,15); // 15 seconds timeout... } function event_PostAddItem($data) { if ($this->getOption('pingpong_pingomatic')=='yes') $this->pingPing(); if ($this->getOption('pingpong_blogs')=='yes') $this->pingBloGs(); if ($this->getOption('pingpong_euroweblog')=='yes') $this->pingEuroWeblog(); if ($this->getOption('pingpong_weblogues')=='yes') $this->pingWebloguesDotCom(); if ($this->getOption('pingpong_bloggde')=='yes') $this->pingBloggDe(); if ($this->getOption('pingpong_technorati')=='yes') $this->pingTechnorati(); if ($this->getOption('pingpong_blogrolling')=='yes') $this->pingBlogRollingDotCom(); } } ?>