Skip to main content
Powered by Drupal, an open source content management system

User login

Navigation

Syndicate contentdrupal 6.x perl cli blog api

posting to drupal 6 blog api from the command line

March 8, 2010 by kinneh

working POC:


#!/usr/bin/perl -w

use strict;
use warnings;
use Data::Dumper;
use XMLRPC::Lite +trace => qw(debug);

my $username = "username";
my $password = "psw";
my $blogid = "blog";
my $proxyurl = 'http://hostname/xmlrpc.php';
my ($buf,$contents);

print "Enter title ->";
my $title = ;
chomp $title;

print "Enter description: (to finish enter crtl-d on a new line)";
my $descr=undef;
while(){
$descr .= $_;
}

print "Enter the full path to a png or jpeg file, just press enter to go with out a file";
my $image = ;

Premium Drupal Themes by Adaptivethemes