curl -X GET 'https://ad.oceanengine.com/open_api/oauth2/advertiser/get/' -H 'Content-Type: application/json' -d' { "app_id": 0, "secret": "", "access_token": "xxx" }转化为php代码
时间: 2023-03-19 08:24:40 浏览: 117
$data = array(
"app_id" => 0,
"secret" => "",
"access_token" => "xxx"
);$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://ad.oceanengine.com/open_api/oauth2/advertiser/get/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($curl);
curl_close($curl);
阅读全文