Hi, I am trying to get images from ebay which take up a lot of time and calls because for each item (could be a fair few) on a page it goes to ebay and makes a call. This is my code: <?php do { // API request variables $endpoint = 'http://svcs.ebay.com/services/search/FindingService/v1'; // URL to call $version = '1.0.0'; // API version supported by your application $appid = '#######'; // Replace with your own AppID $globalid = 'EBAY-GB'; // Global ID of the eBay site you want to search (e.g., EBAY-DE) $query = ''.$row_Surnamelist['lastname'].' corinthian'; // You will need to supply your own query $SafeQuery = urlencode($query); // Make the query URL-friendly $i = '0'; // Initialize the item filter index array to 0 // Construct the findItemsByKeywords call $apicall = "$endpoint?"; $apicall .= "OPERATION-NAME=findItemsByKeywords"; $apicall .= "&SERVICE-VERSION=$version"; $apicall .= "&SECURITY-APPNAME=$appid"; $apicall .= "&GLOBAL-ID=$globalid"; $apicall .= "&keywords=$SafeQuery"; $apicall .= "&paginationInput.entriesPerPage=3"; $apicall .= "$urlfilter"; // Load the call and capture the document returned by eBay API $resp = simplexml_load_file($apicall); // Check to see if the response was loaded, else print an error if ($resp) { $results = ''; } // If there was no response, print an error else { $results = "Oops! Must not have gotten the response!"; }?> PHP: This shows that for every different $row_Surnamelist['lastname'] there is it makes the call, how could I make it make less calls?
You read 3 products for every "$row_Surnamelist['lastname'].' corinthian'" right? How is your output? 1x lastname, 3x ebay auction and this x times per page? Doesn't make sense to me. Try to split lastname to more pages. If that is not possible, you shouldn't display so much auctions. Normally you have on list of auctions and not 2, 3, ... or more.