Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fca61abbda
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (35 sloc) 1.831 kb
ini_set('display_errors', 'on');
$thread="<thread ID goes here>"; // e.g., 455718495 — you'll need to also create a $forum and pass that if you know only the thread's URL or identifier rather than the ID
$api="<key goes here>"; // Generate one at -- Secret key is required for anonymous comment posting
$message="Hello world."; // this is the content of the comment, i.e., what you'd normally type in the postbox
$author_email=""; // optional, including this will still make the comment a guest comment, but it will now be claimable
$author_name="Bruce Wayne"; // optional, can be any display name you like
$fields_string=""; // DO NOT EDIT
// set POST variables
$url = ''; // full documentation at
$fields = array(
'api_secret'=>urlencode($api), // change to api_key when using a public key
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
$ch = curl_init();
// execute POST
$result = curl_exec($ch);
// close connection
// debug info, as you like it
// echo "<p>Request IP: ".$_SERVER['REMOTE_ADDR']."</p>";
// echo "<p>Server IP: ".$_SERVER['SERVER_ADDR']."</p>";
// echo "<p>Request URI: ".$_SERVER['REQUEST_URI']."</p>";
// echo "<p>Path Info: ".$_SERVER['PATH_INFO']."</p>";
// echo "<p>Original Path Info: ".$_SERVER['ORIG_PATH_INFO']."</p>";
// echo "<p>API key: ".$api."</p>";
Jump to Line
Something went wrong with that request. Please try again.