PHP Taobao API Development Primer _php Tutorial

Source: Internet
Author: User
Tags learn php tutorial
It's interesting to see the Taobao API, and learn PHP tutorials by the way

http://open.taobao.com/

Look at the way the API is called, is to assemble the URL and then send an HTTP request to interact with the server

Here's how it works: http://open.taobao.com/dev/index.php/Quick Start Guide

Look at the official demo, sub-use and do not use the SDK two, I do not like the SDK, do not see the mechanism of the background implementation

Take a look at 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 for generating MD5 signatures, and one for assembling URLs.

The two functions are then called according to the arguments, sending an HTTP request to process the returned result

The principle is probably understood, copy and paste run a bit

Stick to code, run ... HTTP 500 error ...

This is difficult, I PHP is also a beginner ah, bite the bullet to find the wrong bar

1. This sentence of two functions in util.php: if ($key! = "&& $val! =") Less quotes

2. Main file This sentence://Sandbox environment call address in front of the space there is a problem, delete it can be

。。。 This official demo is hilarious, too.

Finally can run, return a bunch of messy things, and the API tool returned completely different AH

Http://my.open.taobao.com/apitools/apitools.htm

http://www.bkjia.com/PHPjc/632327.html www.bkjia.com true http://www.bkjia.com/PHPjc/632327.html techarticle See Taobao API very interesting, by the way to learn PHP tutorial http://open.taobao.com/See the next API call way, is to assemble the URL and then send an HTTP request, interacting with the server specific original ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.