Marcus
Well-known member
PHP:
$amazon = new Zend_Service_Amazon(soso and so);
$params = array(
'SearchIndex' => 'All',
'Keywords' => 'ipad'
);
$results = $amazon->itemSearch($params);
PHP:
object(Zend_Service_Amazon_ResultSet)#88 (4) {
["_results":protected] => object(DOMNodeList)#86 (1) {
["length"] => int(0)
}
["_dom":protected] => object(DOMDocument)#90 (34) {
["doctype"] => NULL
["implementation"] => string(22) "(object value omitted)"
["documentElement"] => string(22) "(object value omitted)"
["actualEncoding"] => NULL
["encoding"] => NULL
["xmlEncoding"] => NULL
["standalone"] => bool(true)
["xmlStandalone"] => bool(true)
["version"] => string(3) "1.0"
["xmlVersion"] => string(3) "1.0"
["strictErrorChecking"] => bool(true)
["documentURI"] => string(38) "file:///xenforo/"
["config"] => NULL
["formatOutput"] => bool(false)
["validateOnParse"] => bool(false)
["resolveExternals"] => bool(false)
["preserveWhiteSpace"] => bool(true)
["recover"] => bool(false)
["substituteEntities"] => bool(false)
["nodeName"] => string(9) "#document"
["nodeValue"] => NULL
["nodeType"] => int(9)
["parentNode"] => NULL
["childNodes"] => string(22) "(object value omitted)"
["firstChild"] => string(22) "(object value omitted)"
["lastChild"] => string(22) "(object value omitted)"
["previousSibling"] => NULL
["attributes"] => NULL
["ownerDocument"] => NULL
["namespaceURI"] => NULL
["prefix"] => string(0) ""
["localName"] => NULL
["baseURI"] => string(38) "file:///xenforo/"
["textContent"] => string(19381) "d833eb0f-d49c-4b71-898a lot os stuff is here"
}
["_xpath":protected] => object(DOMXPath)#87 (1) {
["document"] => string(22) "(object value omitted)"
}
["_currentIndex":protected] => int(0)
}
How can I access the stuff? The results are really in the 'textContent', there are the links to the query (here: ipad), and if I change it to another keyword ('flower') I get results about flower-related stuff. Now I just need to access this huge big object. I tried to treat it like a DOMX object, then as a XML object, but I haven't found a php function that extracts information out of that huge object. Where could I start?
Last edited: