name = T_('Ping-O-Matic plugin'); $this->short_desc = T_('Pings the Ping-O-Matic service, which relays your ping to the most common services.'); $this->ping_service_name = 'Ping-O-Matic'; $this->ping_service_note = T_('Pings a service that relays the ping to the most common services.'); } /** * Ping the pingomatic RPC service. */ function ItemSendPing( & $params ) { global $debug; global $outgoing_proxy_hostname, $outgoing_proxy_port, $outgoing_proxy_username, $outgoing_proxy_password; if( ! defined( 'CANUSEXMLRPC' ) || CANUSEXMLRPC !== true ) { // Could not use xmlrpc client because server has no the requested extensions: $params['xmlrpcresp'] = CANUSEXMLRPC; return false; } $item_Blog = $params['Item']->get_Blog(); $client = new xmlrpc_client( '/', 'rpc.pingomatic.com', 80 ); $client->debug = ($debug && $params['display']); // Set proxy for outgoing connections: if( ! empty( $outgoing_proxy_hostname ) ) { $client->setProxy( $outgoing_proxy_hostname, $outgoing_proxy_port, $outgoing_proxy_username, $outgoing_proxy_password ); } $message = new xmlrpcmsg("weblogUpdates.ping", array( new xmlrpcval( $item_Blog->get('name') ), new xmlrpcval( $item_Blog->get('url') ) )); $result = $client->send($message); $params['xmlrpcresp'] = $result; return true; } } ?>