(' . $_REQUEST['readmoretext'] . ')';
} else {
$event_append = '
(Read More...)';
}
}
if(isset($_REQUEST['nocomments'])) {
$props['opt_nocomments'] = new XML_RPC_Value(1,'boolean');
}
if (isset($_REQUEST['preformatted'])) {
$props['opt_preformatted'] = new XML_RPC_Value(1,'boolean');
}
if (isset($_REQUEST['titleprepend'])) {
$title_prepend = $_REQUEST['titleprepend'];
} else {
$title_prepend = '';
}
$stuff['username'] = new XML_RPC_Value($username,'string');
$stuff['hpassword'] = new XML_RPC_Value(md5($password),'string');
$stuff['event'] = new XML_RPC_Value($_REQUEST['excerpt'] . $event_append,'string');
$stuff['subject'] = new XML_RPC_Value($title_prepend . $_REQUEST['title'],'string');
$stuff['year'] = new XML_RPC_Value(date('Y'),'string');
$stuff['mon'] = new XML_RPC_Value(date('m'),'string');
$stuff['day'] = new XML_RPC_Value(date('d'),'string');
$stuff['hour'] = new XML_RPC_Value(date('H'),'string');
$stuff['min'] = new XML_RPC_Value(date('i'),'string');
if(isset($props)) {
$stuff['props'] = new XML_RPC_Value($props,'struct');
}
$passme = new xml_rpc_value($stuff,'struct');
$msg = new XML_RPC_Message('LJ.XMLRPC.postevent',array($passme));
$res = $lj->send($msg,10);
$error = 0;
if ($res->faultCode()) {
$error = 1;
$message = $res->faultString();
}
header('Content-Type: text/xml');
print '' . "\n";
print '' . "\n";
print '' . $error . '' . "\n";
if ($error) {
print '' . $message . '' . "\n";
}
print '' . "\n";
?>