To use POST to submit a form to a site which requires a cookie for authentication you put the cookie in the $options array. Example:
<?php
$auth="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$form_url="http://pirates.spy-hill.net/forum_reply.php?thread=663";
$message = "RoboCodeDwarf now has the gold. \n\n";
$message .= "RoboCodeDwarf sez: [quote] " . `fortune -s` . "[/quote]\n";
$form_fields = array(
'content' => $message,
'add_signature' => 'add_it',
'submit' => 'Post reply' );
$form_files=array();
$form_options=array( 'cookies' => array( 'auth' => $auth ) );
$response = http_post_fields($form_url, $form_fields, $form_files, $form_options );
$n = preg_match("/HTTP\/1.1 302 Found/", $response, $matches);
if($n<1) echo "FAILED\n";
else echo "POSTED\n";
?>