GyPSii利用XML-RPC,PHP里XML-RPC的相关应用示例不少,查查手册、GOOGLE一下就能够找到不少。GyPSii API里提供了一个操做类用来请求服务,并提供了一个请求函数,只要将此函数放进操做类里,就能够方便的使用了,函数以下:php
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; }操做类下载地址:http://lwest.free.fr/doc/php/lib /index.php3?page=net_http_client&lang=en