RuslanK

chat

May 30th, 2021
680
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. <?php
  2.     $token = '777';
  3.     $ch = 'https://api.telegram.org/bot' . $token; 
  4.    
  5.     $response = array(
  6.         'offset' => -341090440
  7.     );     
  8.    
  9.     $ch = curl_init($ch . '/getUpdates');  
  10.     curl_setopt($ch, CURLOPT_POSTFIELDS, $response);
  11.     $sendMessage = curl_exec($ch);
  12.     $sendMessage = json_decode($sendMessage, true);
  13.    
  14.     echo $sendMessage;
  15.  
  16.     curl_close($ch);    
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment