9 require_once('include/salmon.php');
10 require_once('include/crypto.php');
11 // not yet ready for prime time
12 //require_once('include/zot.php');
14 function post_post(App $a) {
16 $bulk_delivery = false;
19 $bulk_delivery = true;
22 $nickname = $a->argv[2];
23 $r = q("SELECT * FROM `user` WHERE `nickname` = '%s'
24 AND `account_expired` = 0 AND `account_removed` = 0 LIMIT 1",
27 if (! dbm::is_result($r)) {
28 http_status_exit(500);
34 $xml = file_get_contents('php://input');
36 logger('mod-post: new zot: ' . $xml, LOGGER_DATA);
39 http_status_exit(500);
41 $msg = zot_decode($importer,$xml);
43 logger('mod-post: decoded msg: ' . print_r($msg,true), LOGGER_DATA);
46 http_status_exit(500);
49 $ret = zot_incoming($bulk_delivery, $importer,$msg);
50 http_status_exit(($ret) ? $ret : 200);