【发布时间】:2020-08-08 12:31:51
【问题描述】:
我有这个 api 有很多广告系列,我需要显示上个月的特定广告系列,比如广告系列的名称和状态,但我不知道该怎么做..
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Campaign Exclude App</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
<h1>Campaigns</h1><br>
<input type="text" name="" id="">
<input type="submit">
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">Id</th>
<th scope="col">Campaign Name</th>
<th scope="col">CPA Goal</th>
<th scope="col">Click Amount</th>
</tr>
</thead>
</table>
<?php
$url='https://www.popads.net/api/campaign_list?key=9a790b65025e0aa449e60384a87b56e97c3ebf39';
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $url);
$result = curl_exec($ch);
curl_close($ch);
$resultArray = json_decode($result);
echo "<pre>";
print_r($resultArray);
?>
</body>
</html>
【问题讨论】:
-
campaign_list 将列出所有广告系列。您可以使用 PHP 函数过滤结果。如果您有任何其他参考资料。您可以在问题内分享
-
我如何过滤结果?
-
查看docs,类似于:
https://www.popads.net/api/campaign_list?key=9a790b65025e0aa449e60384a87b56e97c3ebf39?from=2020-07-01T00:00:00Z&to=2020-08-01T00:00:00Z&tz=Etc/GMT -
这不起作用...
-
您要过滤什么?你有什么要求?他们的其余 API 处于早期阶段。您需要在最后执行操作