EdTGuy Posted January 18 Report Share Posted January 18 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 Link to comment Share on other sites More sharing options...
EdTGuy Posted January 19 Author Report Share Posted January 19 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 Link to comment Share on other sites More sharing options...
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.