<?php
/**
* o------------------------------------------------------------------------------o
* | This package is dual licensed as GPL and a commercial license.               |
* | If you use the code commercially (or if you don't want to be restricted by   |
* | the GPL license), you will need the commercial license. It's only £49 (GBP - |
* | roughly $98 depending on the exchange rate) and helps me out a lot. Thanks.  |
* o------------------------------------------------------------------------------o
*
* © Copyright Richard Heyes
*/

/**
* This will grab a webpage and display it
*
* @category    HTTP
* @package     HTTP_Request
* @version     CVS: $Id: example.php,v 1.7 2007/05/18 19:20:12 avb Exp $
* @ignore
*/

/**
* Class for performing HTTP requests
*/
include('HTTP/Request.php');

$req = &new HTTP_Request('http://www.php.net');
$req->setMethod(HTTP_REQUEST_METHOD_POST);
$req->addPostData('Foo', 'bar');
$req->sendRequest();
$response1 = $req->getResponseBody();

$req->setMethod(HTTP_REQUEST_METHOD_GET);
$req->setURL('http://pear.php.net');
$req->clearPostData();
$req->sendRequest();

$response2 = $req->getResponseBody();

echo
$response1;
echo
$response2;
?>