php glod,基于PHP的黄金价格示例代码-六派数据
示例代碼
本代碼示例是基于PHP的六派數(shù)據(jù)接口進(jìn)行數(shù)據(jù)請(qǐng)求API服務(wù)請(qǐng)求的代碼示例,使用前你需要:
以下是完整代碼示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/shgold";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "參數(shù)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($result["result"]);
}else
var_dump($result);
}else
echo "發(fā)送請(qǐng)求失敗";
示例代碼
本代碼示例是基于PHP的六派數(shù)據(jù)接口進(jìn)行數(shù)據(jù)請(qǐng)求API服務(wù)請(qǐng)求的代碼示例,使用前你需要:
以下是完整代碼示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/shgold_history";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "參數(shù)1",
"date" => "參數(shù)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($result["result"]);
}else
var_dump($result);
}else
echo "發(fā)送請(qǐng)求失敗";
示例代碼
本代碼示例是基于PHP的六派數(shù)據(jù)接口進(jìn)行數(shù)據(jù)請(qǐng)求API服務(wù)請(qǐng)求的代碼示例,使用前你需要:
以下是完整代碼示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/gsgold";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "參數(shù)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($result["result"]);
}else
var_dump($result);
}else
echo "發(fā)送請(qǐng)求失敗";
示例代碼
本代碼示例是基于PHP的六派數(shù)據(jù)接口進(jìn)行數(shù)據(jù)請(qǐng)求API服務(wù)請(qǐng)求的代碼示例,使用前你需要:
以下是完整代碼示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/ingold";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "參數(shù)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($result["result"]);
}else
var_dump($result);
}else
echo "發(fā)送請(qǐng)求失敗";
示例代碼
本代碼示例是基于PHP的六派數(shù)據(jù)接口進(jìn)行數(shù)據(jù)請(qǐng)求API服務(wù)請(qǐng)求的代碼示例,使用前你需要:
以下是完整代碼示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/qhgold";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "參數(shù)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($result["result"]);
}else
var_dump($result);
}else
echo "發(fā)送請(qǐng)求失敗";
示例代碼
本代碼示例是基于PHP的六派數(shù)據(jù)接口進(jìn)行數(shù)據(jù)請(qǐng)求API服務(wù)請(qǐng)求的代碼示例,使用前你需要:
以下是完整代碼示例:
require_once("curl.func.php");
$method = "POST";
$url = "http://open.liupai.net/gold/gzgold";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"goldid" => "參數(shù)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($result["result"]);
}else
var_dump($result);
}else
echo "發(fā)送請(qǐng)求失敗";
與50位技術(shù)專家面對(duì)面20年技術(shù)見(jiàn)證,附贈(zèng)技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的php glod,基于PHP的黄金价格示例代码-六派数据的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: php ibm mq,php linux
- 下一篇: php如何连接wsdl,PHP如何调用w