URL: https://linuxfr.org/users/anonyme/journaux/script-de-ping-pour-technorati-et-consort Title: script de "ping" pour technorati et consort Authors: Anonyme Date: 2006年03月04日T12:46:52+01:00 Tags: Score: 0 Voici un script de ping pour technorati et consort, au cas où ça interesse quelqu'un pour signaler à ces site la mise à jour de son blog, lorsqu'on gère son blog soit même avec perl. Notez que pour une raison qui m'échappe, weblogues.com ne répond pas positivement. #!/usr/bin/perl # # Copyright (c) 2006 Mathieu Roy <yeupou--gnu.org> # [http://yeupou.coleumes.org](http://yeupou.coleumes.org) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: perl-template.pl,v 1.5 2006年02月25日 14:00:21 moa Exp $ use strict; use RPC::XML; use RPC::XML::Client; use Data::Dumper; use Unicode::String; # Config - strings must be valid utf8 my $blogname = "XXXXX"; my $blogurl = "[http://XXXXX](http://XXXXX)"; my @servers = ("[http://www.weblogues.com/ping](http://www.weblogues.com/ping)", £spaces£ £/spaces£"[http://rpc.technorati.com/rpc/ping](http://rpc.technorati.com/rpc/ping)", £spaces£ £/spaces£"[http://rpc.weblogs.com/RPC2](http://rpc.weblogs.com/RPC2)"); # Run for (@servers) { £spaces£ £/spaces£print "Do $_\n"; £spaces£ £/spaces£my $cli = RPC::XML::Client->new($_); £spaces£ £/spaces£my $response = $cli->send_request('weblogUpdates.ping', $blogname, $blogurl); £spaces£ £/spaces£print "--> ".(Dumper $response->value) £spaces£ £/spaces£if ref $response and $response->is_fault; £spaces£ £/spaces£print "--> ".$response->value->{message}."\n" £spaces£ £/spaces£if ref $response and !$response->is_fault; £spaces£ £/spaces£print "--> ".$response."\n" £spaces£ £/spaces£unless ref $response; }

AltStyle によって変換されたページ (->オリジナル) /