wishAPI学习之一create_product
来源:互联网 发布:淘宝造物节 编辑:程序博客网 时间:2024/06/03 21:25
<?php$key = urlencode('an_example_api_key');$name = urlencode('red shoe');$parent_sku = urlencode('red-shoe');$sku = urlencode('red-shoe-11');$inventory = urlencode('100');$price = urlencode('100');$shipping_cost = urlencode('10');$description = urlencode('this is a cool shoe');$tags = urlencode('red,shoe,cool');$main_image = urlencode('http://i.imgur.com/Q1a32kD.jpg');$extra_images = urlencode('http://i.imgur.com/Cxagv.jpg|http://i.imgur.com/Cxagv.jpg');$url = sprintf( "https://merchant.wish.com/api/v1/product/add?key=%s&main_image=%s&name=%s&description=%s&tags=%s&sku=%s&inventory=%s&price=%s&shipping_cost=%s&extra_images=%s&parent_sku=%s", $key, $main_image, $name, $description, $tags, $sku, $inventory, $price, $shipping_cost, $extra_images, $parent_sku);$context = stream_context_create(array( 'http' => array( 'method' => 'POST', 'ignore_errors' => true, ),));// Send the request$response = file_get_contents($url, TRUE, $context);echo $response;echo "\n";?>
0 0
- wishAPI学习之一create_product
- JavaScript入门学习之一
- 学习笔记之一
- Oracle学习之一
- JDBC学习之一
- C#学习笔记之一
- gcc学习系列之一
- DWR学习 之一
- python学习系列之一
- c++学习之一
- AJAX技术学习之一
- webservice学习之一(部署)
- Jabber学习笔记 之一
- 基础学习 C#之一
- 学习J2ME-Polish 之一
- 移动多媒体学习之一
- C++学习笔记之一
- SQL 进阶学习之一
- 把父类list集合中元素放在子类list集合中
- OpenCV 2.4.8组件结构全解析(转)
- 关于ASCII字符码
- 一个简单的PHP生成缩略图函数
- [Linux C编程]守护进程
- wishAPI学习之一create_product
- POJ 3241 Object Clustering
- 指针和数组
- 用flask开发个人博客(28)—— 利用unittest进行单元测试
- 分布式服务框架--dubbo+zookpeer
- android JNI 开发
- codevs 1060 搞笑世界杯 题解报告
- ViewPager 和 GridView 结合实现左右滑动
- 第二章