$curl = curl_init();
$header = array(
'Content-Type: application/json',
'Version: 你要请求的接口版本号',
'Authorization: Basic '.base64_encode('你的应用ID:你获取到的令牌'),
);
curl_setopt($curl, CURLOPT_URL, '请求路径');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
$response = curl_exec($curl);
curl_close($curl);
unset($curl);
print_r($response);
$curl = curl_init();
$header = array(
'Content-Type: application/json',
'Version: 你要请求的接口版本号',
'Authorization: Basic '.base64_encode('你的应用ID:你获取到的令牌'),
);
curl_setopt($curl, CURLOPT_URL, '请求路径');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
$response = curl_exec($curl);
curl_close($curl);
unset($curl);
print_r($response);
$curl = curl_init();
$header = array(
'Content-Type: application/json',
'Version: 你要请求的接口版本号',
'Authorization: Basic '.base64_encode('你的应用ID:你获取到的令牌'),
);
curl_setopt($curl, CURLOPT_URL, '请求路径');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
$response = curl_exec($curl);
curl_close($curl);
unset($curl);
print_r($response);
$curl = curl_init();
$header = array(
'Content-Type: application/json',
'Version: 你要请求的接口版本号',
'Authorization: Basic '.base64_encode('你的应用ID:你获取到的令牌'),
);
curl_setopt($curl, CURLOPT_URL, '请求路径');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
$response = curl_exec($curl);
curl_close($curl);
unset($curl);
print_r($response);
$curl = curl_init();
$header = array(
'Content-Type: application/json',
'Version: 你要请求的接口版本号',
'Authorization: Basic '.base64_encode('你的应用ID:你获取到的令牌'),
);
curl_setopt($curl, CURLOPT_URL, '请求路径');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
$response = curl_exec($curl);
curl_close($curl);
unset($curl);
print_r($response);
$curl = curl_init();
$header = array(
'Content-Type: application/json',
'Version: 你要请求的接口版本号',
'Authorization: Basic '.base64_encode('你的应用ID:你获取到的令牌'),
);
curl_setopt($curl, CURLOPT_URL, '请求路径');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
$response = curl_exec($curl);
curl_close($curl);
unset($curl);
print_r($response);