Advertisement
Guest User

limitati

a guest
Nov 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. <?php
  2. $api = "ilmioapi";
  3. include ("http.php");
  4. global $api;
  5. $content = file_get_contents('php://input');
  6. $update = json_decode($content, true);
  7. $userID = $update[message][from][id];
  8. $msg = $update[message][text];
  9. $chatID = $update[message][chat][id];
  10. $messageid = $update[message][message_id];
  11. $replyforward = $update[message][reply_to_message][forward_from];
  12. $rfid = $update[message][reply_to_message][forward_from][id];
  13. include ("functions.php");
  14. //Start bot
  15. if($msg == "/start"){
  16.     sm($chatID, "*Chat bot creato da* @NoEscape",'','markdown');
  17. }
  18. //Chat Function
  19. if($userID != ilmioid){
  20.     $var = array(
  21.         'chat_id' => ilmioid,
  22.         'from_chat_id' => $chatID,
  23.         'message_id' => $messageid);
  24.     $richiesta = new HttpRequest("get", "https://api.telegram.org/$api/forwardMessage", $var);
  25. }
  26. if($replyforward and $userID == ilmioid){
  27.     $id = $rfid;
  28.     sm($id, $msg);
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement