Questo spedisce la stringa "ciao"
Codice PHP:
 <?php 
require_once 'HTTP/Request.php'
$url "recv.php5"
$data "ciao"
$req =& new HTTP_Request($url);  
//$req->addHeader("Content-Type", "text"); 
//$req->addHeader("Content-Length", strlen($data)); 
$req->setMethod(HTTP_REQUEST_METHOD_POST); 
$req->addPostData($data,true);   
if (!
PEAR::isError($req->sendRequest())) 

     
$response1 $req->getResponseBody(); 

else 
{
      
$response1 "pippo"

echo 
$response1;  
?>
Questo riceve e stampa "ciao=1"
Codice PHP:
<?php
require_once 'HTTP/Request.php';

$body file_get_contents("php://input");

print 
"$body"// o echo danno lo stesso output
?>