我正在尝试使用名为xmlrpc的zend库从xml文件中检索,该文件包含酒店预订列表。这是代码:
$client = new Zend_XmlRpc_Client('http://username:password@distribution-xml.booking.com/xml-rpc');
$service = $client->getProxy();
$hotels = $service->bookings->getHotels();
如何将一些参数传递给getHotels方法?
答案 0 :(得分:1)
我做到了!只需在关联数组中传递参数,如下所示:
$client = new Zend_XmlRpc_Client('http://username:password@distribution-xml.booking.com/xml-rpc');
$content = array(
'paramname' => array(paramvalues)
);
$service = $client->getProxy();
$hotels=$service->bookings->getHotels($content);
;)