topical media & game development
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";
token</eBayAuthToken>
<ns:Credentials xmlns:ns="urn:ebay:apis:eBLBaseComponents">
<ns:DevId>appID</ns:AppId>
<ns:AuthCert>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(call = "GeteBayOfficialTime";
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: 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, query</span>";
echo "</div>";
if (