本代码示例是基于PHP的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/gold/ 申请API服务
以下是完整代码示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/shgold";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "参数1"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
本代码示例是基于PHP的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/gold/ 申请API服务
以下是完整代码示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/shgold_history";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "参数1",
"date" => "参数2"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
本代码示例是基于PHP的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/gold/ 申请API服务
以下是完整代码示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/gsgold";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "参数1"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
本代码示例是基于PHP的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/gold/ 申请API服务
以下是完整代码示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/ingold";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "参数1"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
本代码示例是基于PHP的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/gold/ 申请API服务
以下是完整代码示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/qhgold";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "参数1"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
本代码示例是基于PHP的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/gold/ 申请API服务
以下是完整代码示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/gzgold";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "参数1"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
本代码示例是基于PHP的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/gold/ 申请API服务
以下是完整代码示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/idgold";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";