EdTGuy Posted January 18, 2024 Report Posted January 18, 2024 When I request a banner via the rest api, https://{my host}/www/delivery/fc.php?script=bannerTypeHtml:vastInlineBannerTypeHtml:vastJson&format=json&zones=' + {zone id}, it returns quite a bit of useful information, including campaign id, but excluding the campaign revenue value. Is there some other endpoint I can use to get this information? Quote
EdTGuy Posted January 19, 2024 Author Report Posted January 19, 2024 I poked around a bit, and decided to write one specific to this particular need <?php $host = ''; $usr = ''; $pwd = ''; $db = ''; $crArray = array(); $mysqli = new mysqli($host,$usr,$pwd,$db,3306); if(!$mysqli->connect_error) { $result = $mysqli->query("select campaignid,coalesce(revenue,0) as revenue from rv_campaigns"); $mysqli->close(); while($row = $result->fetch_assoc()) { $crArray[] = $row; } } header("Content-Type: application/json"); echo json_encode($crArray); exit(); ?> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.