在PHP Clickbank的API? [英] Clickbank API in php?

查看:210
本文介绍了在PHP Clickbank的API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要获得点击银行的数码产品,所以我使用他们的API来获取产品,由他们给出可惜给出的例子code不工作,我使用curl要做到这一点,

i need to get digital products from click bank, so am using their API to get products, unfortunately given example code given by them are not working, am using CURL to do this ,

code是如下:

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://api.clickbank.com/rest/1.3/products/list");
curl_setopt($ch, CURLOPT_HEADER, true); 
curl_setopt($ch, CURLOPT_HTTPGET, true); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/xml", "Authorization:DEV-KEY:API-KEY"));
$result = curl_exec($ch);
curl_close($ch);

print $result;

?>

但我得到了下面的错误

but i got the below error

HTTP/1.1 400 Bad Request Date: Thu, 21 Feb 2013 05:20:47 GMT Server: Apache/2.2.23 (FreeBSD) mod_jk/1.2.37 mod_ssl/2.2.23 OpenSSL/0.9.8x Vary: Accept-Encoding Connection: close Transfer-Encoding: chunked Content-Type: text/plain The API call (/api/rest/1.3/products/list) requires parameters which are missing : [site]1

之前有任何一个得到这个错误?

have any one got this error before ?

推荐答案

该公司预计,名为Site参数。请在这里看到的文档:
https://api.clickbank.com/rest/1.3/products

It's expecting a parameter called site. Please see the docs here: https://api.clickbank.com/rest/1.3/products

这篇关于在PHP Clickbank的API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆