代码
function GyPSiiXMLRPC( $uri, $host, $pid, $body="" ) {
$this->addHeader( 'Content-Type', "application/x-gypsii-xmlrpc" );
$this->addHeader( "X-GyPSii-Authorization", "GSAPI signer=\"$pid\",signature=\"$sig\",token=\"$tok\"" );
$http->addHeader("Host","$host");
$this->requestBody = $body;
if( $this->sendCommand( "POST $uri HTTP/$this->protocolVersion" ) )
$this->processReply();
$this->removeHeader('Content-Type');
$this->removeHeader('Content-Length');
$this->removeHeader('X-GyPSii-Authorization');
$this->requestBody = "";
return $this->reply;
}
$this->addHeader( 'Content-Type', "application/x-gypsii-xmlrpc" );
$this->addHeader( "X-GyPSii-Authorization", "GSAPI signer=\"$pid\",signature=\"$sig\",token=\"$tok\"" );
$http->addHeader("Host","$host");
$this->requestBody = $body;
if( $this->sendCommand( "POST $uri HTTP/$this->protocolVersion" ) )
$this->processReply();
$this->removeHeader('Content-Type');
$this->removeHeader('Content-Length');
$this->removeHeader('X-GyPSii-Authorization');
$this->requestBody = "";
return $this->reply;
}
操作类下载地址:http://lwest.free.fr/doc/php/lib /index.php3?page=net_http_client&lang=en