Comments (5)
can you please post the string which is returned from the request?
from apai-io.
Here's the code I used :
$conf = new GenericConfiguration();
$conf
->setCountry('FR')
->setAccessKey('XXX')
->setSecretKey('XXX')
->setAssociateTag('watamooviecom-21');
$search = new Search();
$search->setCategory('Video');
$search->setDirector($realfilm);
$search->setKeywords($nomfilm);
$search->setResponsegroup(array('Large'));
$apaiIo = new ApaiIO($conf);
$response = $apaiIo->runOperation($search);
//$movies = new SimpleXMLElement($reponse);
//echo $movies->movie[0]->Name;
echo $response;
Here's the beginnig of the string . It continues like this with all the attributes of "Large" responsegroup.
Thanks mate.
f7f23927-ebf1-48d2-937b-de30be132a970.1088370000000000TrueKevin MacdonaldThe Last King of ScotlandLargeVideo91http://www.amazon.fr/gp/redirect.html?camp=2025&creative=12742&location=http%3A%2F%2Fwww.amazon.fr%2Fgp%2Fsearch%3Fkeywords%3DKevin%2BMacdonald%2BThe%2BLast%2BKing%2Bof%2BScotland%26url%3Dsearch-alias%253Ddvd&linkCode=xm2&tag=watamooviecom-21&SubscriptionId=XXXXXXXUXYQB000QUUQEOhttp://www.amazon.fr/dernier-roi-dEcosse-Forest-Whitaker/dp/B000QUUQEO%3FSubscriptionId%3DAKILEA3XUXYQ%26tag%3Dwatamooviecom-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB000QUUQEOAdd To Wishlisthttp://www.amazon.fr/gp/registry/wishlist/add-item.html%3Fasin.0%3DB000QUUQEO%26SubscriptionId%3DAKPLEUXYQ%26tag%3Dwatamooviecom-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D12742%26creativeASIN%3DB000QUUQEOTell A
from apai-io.
It seems that your usage is wrong for this.
What you get here is a complete XML from Amazon according to the documentation.
See: http://docs.aws.amazon.com/AWSECommerceService/latest/DG/ItemSearch.html (at the end of the page).
If you try to access it like you do in the commented lines with the SimpleXMLElement it could not work.
You should do something like this:
(string) $movies->Items->Item[0]->ItemAttributes->Title
Please try to analyse the XML which is returned. You can copy it correclty if you view the source of your page and then paste it here and make yourself familiar with the usage of a SimpleXMLElement:
http://php.net/manual/de/simplexml.examples-basic.php.
from apai-io.
Yeah thanks it was the first time I use XML. Now it works like a charm :D
Great work mate !
from apai-io.
Hello Exeu, can do some step by step process of using the library apai-io I have two days to try to make you run and I have not accomplished.
from apai-io.
Related Issues (20)
- AWS.Invalid (truncated...) HOT 5
- SignatureDoesNotMatch HOT 2
- Search for ASIN HOT 3
- 400 Bad Request - Request has expired HOT 1
- when no category defined, no results
- condition = 'used' should be 'Used'
- Question: Catching errors HOT 1
- Restricting "Similar" Results by Node
- how to use without composer? HOT 1
- GuzzleHttp\Exception\ServerException HOT 2
- Detailed Release Notes HOT 1
- amazon country
- Dynamically Insert Value base on User Request
- why does setPage have a limit of 10?
- Error 503 Service Unavailable HOT 6
- Problem when using in two plugins at the same time
- Technical question
- Product Advertising API 5.0 HOT 29
- RequestException.php throwing an error? HOT 1
- Guzzle 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apai-io.