Đang chuẩn bị liên kết để tải về tài liệu:
PHP and MySQL Web Development - P162

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

PHP and MySQL Web Development - P162: PHP and MySQL Web Development teaches the reader to develop dynamic, secure, commercial Web sites. Using the same accessible, popular teaching style of the first edition, this best-selling book has been updated to reflect the rapidly changing landscape of MySQL and PHP. | Solution Overview 777 them as they come. It also means that our display cache and manipulation functions do not need to know what format the data is stored in or where it originated. Having gone through all this processing to retrieve the data we now return control back to the getARS function and hence back to showBrowseNode .The next step is showSummary ars- products page ars- totalResults mode browseNode The showSummary function simply displays the data in the AmazonResultSet as we see it all the way back in Figure 31.1.We have not therefore included the function here. Using SOAP Let s go back and look at the SOAP version of the browseNodeSearch function.We ll repeat this section of the code here error_reporting E_ALL E_NOTICE soapclient new soapclient http soap.amazon.com schemas2 AmazonWebServices.wsdl wsdl soap_proxy soapclient- getProxy parameters mode mode parameters page page parameters type heavy parameters tag this- _assocID parameters devtag this- _devTag parameters sort salesrank parameters browse_node browseNode result soap_proxy- BrowseNodeSearchRequest parameters if isSOAPError result return false this- _totalResults result TotalResults counter 0 foreach result Details as product this- _products counter new Product this- _products counter - soap result Details counter counter unset soapclient unset soap_proxy There are no extra functions to go through here the SOAP client does everything for us. 778 Chapter 31 Connecting to Web Services with XML and SOAP You might not have control over the error reporting setting on your server. If notices are configured to be reported to the browser the NuSOAP library produces notices so we ve turned it off for now. We begin by creating an instance of the SOAP client soapclient new soapclient http soap.amazon.com schemas2 AmazonWebServices.wsdl wsdl We are providing the client with two parameters.The first is the WSDL description of the service and the second parameter is to tell the SOAP client that this is a WSDL