server-webapi-code-09-personalBrowser.php / php
<html> <head> <title>Personal eBay Navigator</title> <style tyle="text/css"> div.topbar { width: 100%; font-family: verdana; border: thin solid black; align: left; } span.mainTitle { font-weight: bold; font-size: 150%; align: right; } div.resultHeading { width: 100%; font-family: verdana; border: thin solid black; align: left; } .catTitle { font-weight: bold; text-decoration: none; display: block; } a.viewItems { font-style: italic; text-decoration: none; } div.itemListingEven { border: thin solid black; margin: 2px; padding: 3px; } div.itemListingOdd { border: thin solid black; margin: 2px; padding: 3px; background-color: EEEEFF; } </style> </head> <body> <div class="topbar"> <span class="mainTitle" display="block">Personal eBay Browser</span> <span class="searchBox"><form method="get">Perform a Search: <input type="text" name="query"><input type="submit"></form></span> </div> <?php error_reporting(E_ALL); require('eBayCaller.php'); echo ''; if (isset(_GET['loadCat']); }elseif(isset(_GET['listCategory'])) { getCategoryListings(_GET['searchcategory'])) { doCategorySearch(_GET['searchcategory']); }elseif (isset(_GET['query']); }else { displayCatagoryListings(); exit; } function getSimpleTime() { global devID, cert, call = "GeteBayOfficialTime"; <?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <RequesterCredentials soapenv:mustUnderstand="0" xmlns="urn:ebay:apis:eBLBaseComponents"> <eBayAuthToken>token</eBayAuthToken> <ns:Credentials xmlns:ns="urn:ebay:apis:eBLBaseComponents"> <ns:DevId></ns:DevId> <ns:AppId>appID</ns:AppId> <ns:AuthCert></ns:AuthCert> </ns:Credentials> </RequesterCredentials> </soapenv:Header> <soapenv:Body> <GeteBayOfficialTimeRequest xmlns="urn:ebay:apis:eBLBaseComponents"> <ns1:Version xmlns:ns1="urn:ebay:apis:eBLBaseComponents">version</ns1:Version> </GeteBayOfficialTimeRequest> </soapenv:Body> </soapenv:Envelope> XMLBLOCK; call, RAWxml; RAWxml); echo "<pre>"; print_r(xml->children('schemas.xmlsoap.org/soap/envelope/')->children('urn:ebay:apis:eBLBaseComponents')->GeteBayOfficialTimeResponse->Timestamp . "\n"; xml->children('schemas.xmlsoap.org/soap/envelope/')->children('urn:ebay:apis:eBLBaseComponents'); print_r(</pre>"; } function getTime() { call = "GeteBayOfficialTime"; <soapenv:Body> <GeteBayOfficialTimeRequest xmlns="urn:ebay:apis:eBLBaseComponents"> <ns1:Version xmlns:ns1="urn:ebay:apis:eBLBaseComponents">425</ns1:Version> </GeteBayOfficialTimeRequest> </soapenv:Body>'; message = generateRequest(message; call, xml = simplexml_load_string(xml->children('schemas.xmlsoap.org/soap/envelope/')->children('urn:ebay:apis:eBLBaseComponents')->GeteBayOfficialTimeResponse->Timestamp . "\n"; } function newGetTime() { queryInfo = array(); myRequest = generateBody(queryInfo); myRequest); call, xml->GeteBayOfficialTimeResponse->Timestamp . "\n"; } function doBasicSearch(call = "GetSearchResults"; attributes['Version'] = 425; query; call, message = generateRequest(xml = calleBay(message, FALSE); echo "<div class=\"resultHeading\">"; echo "<span class=\"resultHeader\">Search Results for: </span>"; echo "</div>"; if (xml->GetSearchResultsResponse->PaginationResult->TotalNumberOfEntries == 0) { echo "Sorry, there are no results to display"; }else { xml->GetSearchResultsResponse->SearchResultItemArray->SearchResultItem AS results[] = results); } } function doCategorySearch(category) { attributes = array(); attributes['Query'] = attributes['CategoryID'] = myRequest = generateBody(attributes); myRequest); call, <div class=\"resultHeading\">"; echo "<span class=\"resultHeader\">Search Results for: query</span>"; echo "</div>"; if (