Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $TOKEN = "tokenbot";
- $trustedgroup = "-idgroup";
- //promosi
- $promosi = "Ayo promosikan grup ini dan channelnya";
- $url = 'https://api.telegram.org/bot'.$TOKEN.'/sendMessage';
- $parameters = [
- 'chat_id' => $trustedgroup,
- 'text' => $promosi,
- 'parse_mode' => 'html',
- 'disable_web_page_preview' => true,
- ];
- $link = $url . '?' . http_build_query($parameters);
- // persiapkan curl
- $ch = curl_init();
- // set url
- curl_setopt($ch, CURLOPT_URL, $link);
- // return the transfer as a string
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- // $output contains the output string
- $output = curl_exec($ch);
- // tutup curl
- curl_close($ch);
- ?>
Add Comment
Please, Sign In to add comment