Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Net::Trackback question

by 2ge (Scribe)
on Sep 12, 2005 at 13:45 UTC ( [id://491258]=perlquestion: print w/replies, xml ) Need Help??

2ge has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I'd like to test this module, I installed it on AS perl 5.8.7, but problem is, I can't ping any url, here is code:
use strict; use warnings; use Net::Trackback::Client; use Net::Trackback::Ping; my $ping = Net::Trackback::Ping->new(); $ping->title('This is test'); #$ping->url('http://rpc.technorati.com/rpc/ping'); $ping->url('http://ping.blo.gs'); $ping->ping_url('http://myblog.blogs.com/2005/09/Just-testing.html'); my $client = Net::Trackback::Client->new(); my $msg = $client->send_ping($ping); print $msg->to_xml;
After running I always get:
<?xml version="1.0" encoding="iso-8859-1"?> <response> <error>405</error> <message></message> </response>

Could anyone point me? Thanks.

Replies are listed 'Best First'.
Re: Net::Trackback question
by gargle (Chaplain) on Sep 12, 2005 at 14:11 UTC

    Hi,

    From trackback

    TrackBack uses a REST model, where requests are made through standard HTTP calls. To send a TrackBack ping, the client makes a standard HTTP request to the server, and receives a response in a simple XML format (see below for more details).

    Do you have a trackback server running? The 405 seems to indicate you don't...

    --
    if ( 1 ) { $postman->ring() for (1..2); }
      There really isn't a 'trackback server' if you read the specification...this stuff runs via standard HTTP servers. A trackback is just a way to notify a particular posting on one blog that you wrote something about it in another using good old HTTP POST.

      Now, are you using the 1.01 version of this module? According to the CPAN Testers something was wrong with 1.0 for Windows.

      Celebrate Intellectual Diversity

        Hi Infinite,

        I am running v1.01, didn't find ppm, but I did Makefile/nmake test/nmake install, and it should works - no errors. I'd like to know, if somebody can test this piece of code on *nix, or send me what I do wrong (replace my url with existing one, doesn't matter which), also using other XML-RPC trackback url, here is list I've found: here.

        I have no idea why it is not working, also I thought about ethereal to capture http communication, but it is a bit difficult here :) Thanks for all replies/ideas.
Re: Net::Trackback question
by eXile (Priest) on Sep 12, 2005 at 14:13 UTC
    This 405 error code looks like a standard HTTP error code. For a list see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.

    405 is a 'method not allowed'. I'd recommend dumping your network traffic (using tools like tcpdump, ethereal) to see what exactly is going on. If you don't know HTTP, you'll learn a lot in the process.

    PS: when I try the above code right now I get an 404 error (probably because the http://myblog.blogs.com/2005/09/Just-testing.html was removed)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://491258]
Approved by holli
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-23 15:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found