It's interesting to see the taobao api. By the way, let's take a php Tutorial.
Http://open.taobao.com/
After reading the api call method, assemble the url and then send an http request to interact with the server.
For details, refer to the following:Http://open.taobao.com/dev/index.php/Quick Start Guide
Take a look at the official demo, which is divided into two types: use and not use sdk. I do not like the sdk and cannot see the background implementation mechanism.
Let's take a look at the php code that does not use the sdk:Http://open.taobao.com/dev/index.php/php%e8%b0%83%e7%94%a8%e7%a4%ba%e4%be%8b%e4%bb%a3%e7%a0%81
Util. php
There are two functions, one generating the md5 signature and the other assembling the url
Then, call these two functions based on the parameters, send an http request, and process the returned results.
I understand the principle. Copy, paste, and run it.
Stick the code and run... Http 500 error...
This can be difficult. I am also a beginner in php. I am looking for a mistake.
1. This sentence of the two functions in util. php: if ($ key! = ''& $ Val! = '') The quotation marks are missing.
2. Comment on the main file: // There is a problem with the space in front of the sandbox environment call address. Delete it.
... This official demo is also funny.
It can finally run and return a bunch of messy things, which is totally different from what the api tool returns.
Http://my.open.taobao.com/apitools/apitools.htm