|
\n";
}
}
}
if($espot_results) {
$espot_results = "
Uhren & Schmuck
· Edelsteine
·· Karneol
";
}
if(!( eregi('ebay', $title) || eregi('ebay', $description)) && eregi('redirector.asp', $real_URL) ) {
list($garbage, $follow_url) = split('url=http%3A%2F%2F', $real_URL);
list($follow_url, $garbage) = split('%2F', $follow_url);
$follow_url = 'http://' . urldecode($follow_url);
$link_tag = "";
$espot_results .= " | $link_tag $img_tag | $link_tag $title - $description |
$espot_results
\n";
}
print $espot_results;
?>
Um sich kostenlos bei eBay zu registrieren - hier klicken
';
# edit the template to meet fit your layout
$result_template = '\n';
$eBayPic = "";
$track_base = 'http://www.preispiraten.de/cgi-bin/wtr/tr.pl?';
if(!isset($ebay_num)) { $ebay_num = $_SERVER["QUERY_STRING"]; }
$cache_path = 'ebay/cache/';
$appID = 'WEBTIPMEDII976B459XCHLT596W2IG';
$country = 'EBAY-DE';
$results_count = 20;
$api_url = 'http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByCategory&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=' . $appID . '&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&categoryId=' . $ebay_num . '&paginationInput.entriesPerPage=' . $results_count . '&GLOBAL-ID=' . $country;
$content = '';
$responseXml = file_get_contents($api_url);
//get results nodes
$xml = simplexml_load_string($responseXml);
if($xml->searchResult->item) {
foreach ($xml->searchResult->item as $item) {
$title = utf8_decode($item->title);
$itemUrl = utf8_decode($item->viewItemURL);
$price = $item->sellingStatus->currentPrice;
$picUrl = $item->galleryURL;
if($picUrl)
$pic = '';
else
$pic = $eBayPic;
if($redir_switch) {
//$tracklink = 'http://rover.ebay.com/rover/1/707-53477-19255-0/1?ff3=4&pub=5574643622&toolid=10001&campid=5336645584&customid=&mpre=' . urlencode($itemUrl);
$tracklink = 'http://rover.ebay.com/rover/1/707-53477-19255-0/1?ff3=4&pub=5574866061&toolid=10001&campid=5338210209&customid=&mpre=' . urlencode($itemUrl);
} else {
$tracklink = $itemUrl;
}
$tracklink = $track_base.$tracklink;
$BINPrice = $item->listingInfo->buyItNowPrice;
$bin_or_bid_caption = '';
$bin_or_bid_value = '';
// is current item an auction?
if(($item->listingInfo->listingType == 'Auction')
|| ($item->listingInfo->listingType == 'AuctionWithBIN'))
{
$bin_or_bid_caption = 'Aktuelles Gebot:';
$bin_or_bid_value = ''.$price.' €';
}
else // FixedPrice, StoreInventory, AdFormat, Classified
{
$bin_or_bid_caption = "".
"";
$bin_or_bid_value = "".$price." €";
}
/*
if($redir_switch)
$tracklink = 'http://rover.ebay.com/rover/1/707-53477-19255-0/1?ff3=4&pub=5574643622&toolid=10001&campid=5336645584&customid=&mpre=' . urlencode($itemUrl);
else
$tracklink = $itemUrl;
*/
eval ("\$content .= \"$result_template\";");
}
}
print $content;
//print "fabs";
##################### CLEAN CACHE FUNCTION ##############################
function clean_cache()
{
global $cache_path;
$rnd = rand(0, 100);
if($rnd == 1)
{
if ($handle = opendir($cache_path))
{
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
$fileto = $cache_path . $file;
$tm = time() - filemtime($fileto);
if($tm > 3600) # remove cache files older > 1 hour
unlink($fileto);
}
}
closedir($handle);
}
}
}
?>
$pic | $title $bin_or_bid_caption $bin_or_bid_value | |
| $pic | $ProductName Author $Authors; ReleaseDate: $ReleaseDate; Publisher: $Manufacturer; Availability: $Availability | $OurPrice |