nakrutkaAmino - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of nakrutkaAmino.php

  1. <?php
  2.     include "amino.php";
  3.  
  4.     $config = json_decode(file_get_content("./conf.json"), true);;
  5.     $amino = new Amino($config["[email protected]"], $config["97835701"]);
  6.     
  7.     $amino->listen(function() use($amino, $db){
  8.         $amino->on("message_new", function($data) use($amino){
  9.             if(mb_substr($data["message"],0,8) == "!накрутка"){
  10.                 $count = explore(" ", $data["message"])[1];
  11.                 $text = mb_substr($data["message"],10);
  12.                 $amino->reply("Спам начался!");
  13.                 for($i=0; $i<=$count; $i++){
  14.                     $amino->commentProfile($text, $data["community_id"], $data["author"]);
  15.                 }
  16.             }
  17.         });
  18.     });
  19. ?>
File Description
  • nakrutkaAmino
  • PHP Code
  • 25 Nov-2020
  • 731 Bytes
You can Share it: