Katzenklappen bei ebay

'MaxPrice', 'value' => $max_price, 'paramName' => 'Currency', 'paramValue' => 'EUR'), array( 'name' => 'MinPrice', 'value' => $min_price, 'paramName' => 'Currency', 'paramValue' => 'EUR'), array( 'name' => 'MaxBids', 'value' => $max_bids, 'paramName' => '', 'paramValue' => ''), array( 'name' => 'MinBids', 'value' => $min_bids, 'paramName' => '', 'paramValue' => ''), array( 'name' => 'Condition', 'value' => $condition, 'paramName' => '', 'paramValue' => ''), array( 'name' => 'ListingType', 'value' => $auct_type, 'paramName' => '', 'paramValue' => ''), ); for ($counter = 0; $counter <= 4; $counter += 1) { if($filterArray[$counter]['value']==""){ unset($filterArray[$counter]); } } // Build item filters URL array function buildURLArray2 ($filterArray) { global $filter1; //global $i; $i = '0'; // Initialize the item filter index array to 0 // Iterate through each filter in the array foreach($filterArray as $itemFilter) { // Iterate through each key in the filter foreach ($itemFilter as $key =>$value) { $r = '0'; //A number that increments each time the above "for" loops; if(is_array($value)) { //if the 'value' var content is an array if($value != "") { //check to make sure the content isn't empty foreach($value as $j => $content) { $filter1 .= "&itemFilter($i).$key($j)=$content"; } } } else { //this isnt an array so just print the single contents of the 'value' container, no indexing of keys needed if($value != "") { $filter1 .= "&itemFilter($i).$key=$value"; } } $r++; } $i++; } return $filter1; } // End of buildURLArray function $urlfilter=buildURLArray2($filterArray); // Load the call and capture the document returned by eBay API $search = $query; $SafeQuery = urlencode($query); // Make the query URL-friendly // Construct the findItemsAdvanced call $apicall = "$endpoint?"; $apicall .= "OPERATION-NAME=findItemsAdvanced"; $apicall .= "&SERVICE-VERSION=$version"; $apicall .= "&SECURITY-APPNAME=$appid"; $apicall .= "&GLOBAL-ID=$globalid"; $apicall .= "&keywords=$SafeQuery"; if($category!=""){ $apicall .= "&categoryId=$category"; } if($zip!=""){ $apicall .= "&buyerPostalCode=$zip"; } $apicall .= "&affiliate.networkId=9"; $apicall .= "&affiliate.trackingId=$campid"; if($sort_by!=""){ $apicall .= "&sortOrder=$sort_by"; } $apicall .= "&descriptionSearch=$search_desc"; $apicall .= "&paginationInput.entriesPerPage=$num_rows"; $apicall .= $urlfilter; $resp = simplexml_load_file($apicall); // Check to see if the response was loaded, else print an error if ($resp->searchResult->item) { $results = ''; $result = "
"; if($dis_icon=="yes" || $dis_search_bar=="yes"){$result .="";} $result .=""; $results = ''; $bgColor = $row_color; // If the response was loaded, parse it and build links foreach($resp->searchResult->item as $item) { $pic = $item->galleryURL; $linka = $item->viewItemURL; $title = $item->title; $price = $item->sellingStatus->currentPrice; $bidcount = $item->sellingStatus->bidCount; $price = sprintf("%.2f",$price); if($bidcount==""){$bidcount=0;} $time = $item->sellingStatus->timeLeft; $time = getPrettyTimeFromEbayTime2($time); //reduce fp for seo-------------------------------------------------------------------------------- $rover = "kaufen"; // This is the word 'rover' will be replaced with in the link, $ebay = "angebote"; // Ditto but for the word 'ebay' i.e. with this example you $newterms = array($rover,$ebay); $oldterms = array("rover","ebay"); $linka = str_replace ( $oldterms, $newterms, $linka ); $linka = base64_encode ( $linka ); $storeurl = get_bloginfo ( 'wpurl' ) . "/wp-content/plugins/ebay-pn-plugin/store.php?"; $linka = $storeurl."&buy=".$rover."&cheap=".$ebay."&buyurl=".$linka; //display the result in a table row if ( $auct_type == "FixedPrice" ) { $gebote = "\"Sofort Kaufen\"-Angebot"; } else { $gebote = "Anzahl der Gebote: ".$bidcount." ";} $result .=" "; //alternate the background colours if($bgColor==$row_color){ $bgColor=$alt_row_color; } else { $bgColor=$row_color; } } $storeurl = get_bloginfo ( 'wpurl' ) . "/wp-content/plugins/ebay-pn-plugin.php?"; $follow = "http://rover.ebay.com/rover/1/711-53200-19255-0/1?type=3&campid=".$campid."&toolid=10001&customid=&ext=".$search."&satitle=" . $SafeQuery; $follow = str_replace ( $oldterms, $newterms, $follow ); $follow = base64_encode ( $follow ); $follow = $storeurl."&buy=".$rover."&cheap=".$ebay."&buyurl=".$follow; $result .="
";if($dis_icon=="yes"){ $result .="
eBay
";}if($dis_search_bar=="yes"){ $result .="
";}$result .="
 Bild Beschreibung Details
".$title." Preis: ".str_replace (".", ",", $price)." Euro
$gebote
Ende: ".$time."
"; } else { // If there was no response, print an error echo "Oops! Zu deinem Suchbegriff gibt es leider keine Ergebnisse. Versuche einen anderen Suchbegriff!"; } $result .="
 Weitere Angebote ansehen ... "; $result .="
"; } return $result; } //------------------------------------------------------------------------- function getPrettyTimeFromEbayTime2($eBayTimeString){ // Input is of form 'PT12M25S' $matchAry = array(); // initialize array which will be filled in preg_match $pattern = "#P([0-9]{0,3}D)?T([0-9]?[0-9]H)?([0-9]?[0-9]M)?([0-9]?[0-9]S)#msiU"; preg_match($pattern, $eBayTimeString, $matchAry); $days = (int) $matchAry[1]; $hours = (int) $matchAry[2]; $min = (int) $matchAry[3]; // $matchAry[3] is of form 55M - cast to int //$sec = (int) $matchAry[4]; $retnStr = ''; if ($days) { $retnStr .= "$days Tag" . plurals1($days).","; } if ($hours) { $retnStr .= " $hours Std,"; } if ($min) { $retnStr .= " $min Min"; } //if ($sec) { $retnStr .= " $sec sec" . plurals1($sec); } return $retnStr; } // function function plurals1($intIn) { // if $intIn > 1 return an 's', else return null string if ($intIn > 1) { return 'e'; } else { return ''; } } ?> internal_server_error<![CDATA[WordPress &rsaquo; Fehler]]> 500