Telegram.php 416 B

12345678910111213141516171819
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: chendeben
  5. * Date: 2017/12/6
  6. * Time: 11:55
  7. */
  8. namespace Heanup\Library;
  9. class Telegram
  10. {
  11. public static function sendMessage(){
  12. $telegram=new \Telegram("532191649:AAGxdBNPQGrHo0Ralqpg_sSZFrJJwCh0KIk");
  13. $chat_id = $telegram->ChatID();
  14. $content = array('chat_id' => $chat_id, 'text' => 'Test');
  15. $telegram->sendMessage($content);
  16. }
  17. }