'; $youTubeXml = youTubeRestCall ($_GET["videoid"], $youTubeDevID ); if (!empty($youTubeXml)) { $xml = simplexml_load_string($youTubeXml); // var_dump($xml); $status = $xml[status]; // the video id supplied does not exist on YouTube if (status == 'fail') { $errorMsg = 'Video not found. Please recheck the specified video ID.'; $newUrl = ''; } else { foreach ($xml->video_details as $row) { $tags = $row->tags; } // no tags on the video, so we can't display matching ebay listings if (empty($tags)) { $errorMsg = 'No Tags are assigned to this VideoID, so default eBay Listings will be displayed'; $noTags = 0; } else { $tagArray = explode(' ',$tags); $noTags = count($tagArray); } //$qry = $tagArray[0]; $qry = '(' . str_replace(' ',',',$tags) . ')'; $maxResults = 20; $category = ''; if (!$_GET['Order']) { $orderBy = 'MetaEndSort'; } else { $orderBy = $_GET["Order"]; } if (!$_GET['ItemTypeFilter']) { $itemTypeFilter = '3'; } else { $itemTypeFilter = $_GET["ItemTypeFilter"]; } if (!$_GET['HighestPrice']) { $highestPrice = 0; } else { $highestPrice = $_GET["HighestPrice"]; } if (!$_GET['SearchInDescription']) { $searchInDescription = 0; } else { $searchInDescription = $_GET["SearchInDescription"]; } if (!$_GET['AuctionsWithNoBids']) { $auctionsWithNoBids = 0; } else { $auctionsWithNoBids = $_GET["AuctionsWithNoBids"]; } if (!$_GET['page']) { $page = 1; $skip = 0; } else { $page = $_GET['page']; $skip = ($page*$maxResults); } $buffer = ebayRestCall($qry, $maxResults, $siteId, $skip, $category, $orderBy, $itemTypeFilter, $highestPrice, $endTimeFrom, $endTimeTo, $searchInDescription, $sid ); if (!empty($buffer)) { $xml = simplexml_load_string($buffer); $totaldisplay = $maxResults; $count = $xml->PaginationResult->TotalNumberOfEntries; $start = (($page-1)*$totaldisplay); $end = $totalDisplay; if ($count > 0) { $ebayResults = 'Y'; } else { $ebayResults = 'N'; $errorMsg = 'NOTE: No Specific eBay results for the tag [' . $qry .'], so default eBay Listings will be displayed'; } } else { $ebayResults = 'N'; } } } } ?>
|
|||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|