"; exit(); } function dispatch($client, $method, $args) { $req = new PhpXmlRpc\Request($method, $args); $resp = $client->send($req); if (!$resp) { print "

IO error: " . $client->errstr . "

"; bomb(); } if ($resp->faultCode()) { print "

There was an error: " . $resp->faultCode() . " " . $resp->faultString() . "

"; bomb(); } $encoder = new PhpXmlRpc\Encoder(); return $encoder->decode($resp->value()); } // create client for discussion server $dclient = new PhpXmlRpc\Client("http://xmlrpc.usefulinc.com/${mydir}discuss.php"); // check if we're posting a comment, and send it if so @$storyid = $_POST["storyid"]; if ($storyid) { // print "Returning to " . $HTTP_POST_VARS["returnto"]; $res = dispatch($dclient, "discuss.addComment", array(new PhpXmlRpc\Value($storyid), new PhpXmlRpc\Value(stripslashes(@$_POST["name"])), new PhpXmlRpc\Value(stripslashes(@$_POST["commenttext"])),)); // send the browser back to the originating page Header("Location: ${mydir}/comment.php?catid=" . $_POST["catid"] . "&chanid=" . $_POST["chanid"] . "&oc=" . $_POST["catid"]); exit(0); } // now we've got here, we're exploring the story store ?> meerkat browser

Meerkat integration

Make a comment on the story

Your name:

Your comment:

"/>
new PhpXmlRpc\Value($chanid, "int"), "ids" => new PhpXmlRpc\Value(1, "int"), "descriptions" => new PhpXmlRpc\Value(200, "int"), "num_items" => new PhpXmlRpc\Value(5, "int"), "dates" => new PhpXmlRpc\Value(0, "int"), ), "struct"))); } ?>

Subject area:

News source:

Stories available

"; print ""; print "\n"; // now look for existing comments $res = dispatch($dclient, "discuss.getComments", array(new PhpXmlRpc\Value($v['id']))); if (sizeof($res) > 0) { print "\n"; } print "\n"; } ?>
" . $v['title'] . "
"; print $v['description'] . "
"; print "Read full story "; print "Comment on this story"; print ""; print "

" . "Comments on this story:

"; for ($i = 0; $i < sizeof($res); $i++) { $s = $res[$i]; print "

From: " . htmlentities($s['name']) . "
"; print "Comment: " . htmlentities($s['comment']) . "

"; } print "


Meerkat powered, yeah!