3 function salmon_return($val) {
10 header($_SERVER["SERVER_PROTOCOL"] . ' ' . $val . ' ' . $err);
15 function salmon_post(&$a) {
17 $xml = file_get_contents('php://input');
19 $debugging = get_config('system','debugging');
21 file_put_contents('salmon.out',$xml,FILE_APPEND);
23 $nick = (($a->argc > 1) ? notags(trim($a->argv[1])) : '');
24 $mentions = (($a->argc > 2 && $a->argv[2] === 'mention') ? true : false);
26 $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",
34 require_once('include/items.php');
36 // Create a fake feed wrapper so simplepie doesn't choke
38 $tpl = load_view_file('view/atom_feed.tpl');
40 $base = substr($xml,strpos($xml,'<entry'));
42 $xml = $tpl . $base . '</feed>';
44 salmon_return(500); // until the handler is finished
46 // consume_salmon($xml,$importer);