Dave Jumpers (djdavejumpers) wrote in lj_clients,
Dave Jumpers
djdavejumpers
lj_clients

A post in my journal with Perl.

Hi,
I'm trying to write something simple in Perl, to post a private message in my journal.
Is not working for me, though.

This is what I have done so far:

#!/usr/bin/perl -w
use IO::Socket::INET;
$MySocket=new IO::Socket::INET->new(
PeerPort=>80,
Proto=>'tcp',
PeerAddr=>'livejournal.com');

$msg="POST /interface/flat HTTP/1.0
Host: www.livejournal.com
Content-type: application/x-www-form-urlencoded
mode=postevent&user=LJUSER&password=LJPASSWORD&event=yomama+is+phat&security=private";
$MySocket->send($msg);
exit;


I tried just telnet www.livejournal.com and pasting $msg, and the connection gets' closed.
Am I missing something?
Also, how would you implement this, so that the password is not sent in clear text?.

I read http://www.livejournal.com/doc/server/ljp.csp.flat.postevent.html but says that password is Deprecated?
I'm confused.

Perhaps one of you can give me an example on what to put on that line that starts with "mode"

Thanks
-Dave-
Subscribe
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic
  • 21 comments