【发布时间】:2013-02-06 14:11:39
【问题描述】:
我正在使用点击银行 API。在该 API 中,我想显示该 API 的产品列表。我是点击银行 API 的初学者。
例如
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://api.clickbank.com/rest/1.3/products/");
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-DEVAPIKEY:API-CLERKAPIKEY"));
$result = curl_exec($ch);
curl_close($ch);
print $result;
如何解决。请尽快给我建议。
【问题讨论】:
-
你想要输出什么? $result 打印什么?
-
您收到此错误消息啊?HTTP/1.1 406 Not Acceptable Date: Thu, 21 Feb 2013 09:56:34 GMT 服务器:Apache/2.2.23 (FreeBSD) mod_jk/1.2.37 mod_ssl /2.2.23 OpenSSL/0.9.8x Content-Length: 1112 Vary: Accept-Encoding Content-Type: text/html;charset=utf-8