?> </option> <?php } } ?> </select> </label> <input type="submit" value="Search!"> </p> </form> <?php if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') { $amazon = new Query("1338XJTNFMTHK413WFR2"); try { $amazon->category($searchFor)->ResponseGroup('Large')->Keywords($keywords); $results = $amazon->search(); if ($results->totalResults() > 0) { echo '<div id="results">'; echo '<h2>Search Results</h2>'; foreach ($results as $result) { echo "<div>"; echo "<h3>{$result->Title}</h3>"; if (isset($result->MediumImage)) { ?> <div class="thumb"> <a href='<?php echo $result->DetailPageURL; ?> ' title='<?php echo $result->Title;
/** * Ensures that the query API throws an exception when the category is invalid * * @return void */ public function testQueryExceptionCategoryInvalid() { $this->setExpectedException('ZendService\\Amazon\\Exception\\RuntimeException', 'The value you specified for SearchIndex is invalid.'); $this->_query->category('oops')->search(); }