recordcount = 0; $fp = fopen ($wsurl, "r"); if ($fp) { $xml = ""; while ($data=fgets($fp, 32000)) $xml .= $data; fclose ($fp); $this->xml = utf8_decode($xml); } else return ""; if ($this->debug) echo "
".htmlentities($xml)."
"; return $xml; } function parse () { $items = $this->extractstring ($this->xml, "" . htmlentities($data[$i]) . "\n\n\n"; $i++; } else $ok = false; } return $data; } function extractstring ($xml, $tag1, $tag2) { $i1 = strpos($xml, $tag1); $i2 = strpos($xml, $tag2); if ( ($i1!==false) && ($i2!==false) ) { $i1 = $i1 + strlen ($tag1); $len = $i2 - $i1; $data = substr ($xml, $i1, $len); } else $data = ""; return $data; } function search_by_asin ($asin) { $wsurl = "http://webservices.amazon.fr/onca/xml?Service=AWSECommerceService&SubscriptionId=" . $this->subscriptionID . "&Operation=ItemLookup&IdType=ASIN&ItemId=" . $asin . "&ResponseGroup=Medium,OfferFull"; $this->load ($wsurl); if (strpos($this->xml, "
| \n";
if (!$aws->cache_dir)
$aws->cache_active = false;
get_image ($aws->cache_dir, $i, 1, $aws->cache_active, $aws, &$picsrc, &$picsrc_height, &$picsrc_width);
//if ($aws->item[$i]->smallimage_url)
// $temp .= " | \n\t\n\t | \n";
$temp .= "\t\t " . $aws->item[$i]->title . " | \n