ack == "Success") { $results = ''; // If the response was loaded, parse it and build links foreach($resp->searchResult->item as $item) { $pic = $item->galleryURL; $link = $item->viewItemURL; $title = $item->title; $price= $item->sellingStatus->currentPrice; $shippingprice= $item->shippingInfo->shippingServiceCost; $price= (float)$price; $shippingprice= (float)$shippingprice; $shippingprice= number_format($shippingprice, 2); $totalprice= $price +$shippingprice; $totalprice= (float)$totalprice; $totalprice= number_format($totalprice, 2); // For each SearchResultItem node, build a link and append it to $results $results .= " $title Price: $$price Shipping Cost: $$shippingprice Shipping Cost: $$totalprice "; } } // If the response does not indicate 'Success,' print an error else { $results = "

Oops! The request was not successful. Make sure you are using a valid "; $results .= "AppID for the Production environment.

"; } ?> eBay Search Results for <?php echo $query; ?>

eBay Search Results for