Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $token = '777';
- $ch = 'https://api.telegram.org/bot' . $token;
- $ch = curl_init($ch . '/getUpdates');
- $ch = setOpt($ch, $response);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $sendMessage = curl_exec($ch);
- curl_close($ch);
- ob_start();
- print_r($sendMessage);
- $out = ob_get_clean();
- file_put_contents(__DIR__ . '/message.txt', $out);
- function setOpt($ch, $response)
- {
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_HEADER, false);
- return $ch;
- }
- ?>
Add Comment
Please, Sign In to add comment