<?php
include('./class.HTTPPost.inc');
$arr['name'] = 'Daniel';
$arr['address'] = 'New York';
$arr['email'] = 'daniel@websapp.com';
$arr['foo']['bar'] = 'whatsoever';
$arr['foo']['bar']['query'] = 'something else';
$post = new HTTPPost('http://localhost/tests/HTTPPost/postCollector.php', $arr);
$result = $post->post();
if($headers){
print nl2br($post->getResponseHeaders());
}
print $result;
/* equivalent to:
print $post->getResponseBody();
*/
?>
|