Recommend this page to a friend! | Stumble It! | Bookmark in del.icio.us |
Classes of Daniel Kushner | > | HTTPPost | > | example.php | > | Download | ||
|
Download |
<?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(); */ ?> |