DemoAdBlock.php 370 B

123456789101112
  1. <?php
  2. require('../../vendor/autoload.php');
  3. use Volc\Service\AdBlocker;
  4. $client = AdBlocker::getInstance();
  5. // call below method if you dont set ak and sk in ~/.volc/config
  6. $client->setAccessKey("ak");
  7. $client->setSecretKey("sk");
  8. $response = $client->adBlock(3332, "chat", "{\"uid\":123411, \"operate_time\":1609818934, \"chat_text\":\"a😊\"}");
  9. echo $response;