Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (mb_stripos($text, '/pars') !== false) {
- sendTelegram(
- 'sendMessage',
- array(
- 'chat_id' => TELEGRAM_CHATID,
- 'text' => 'Введите сайт для проверки на базу:'
- )
- );
- if (!empty($data['message']['text']))
- {
- $site = $data['message']['text'];
- $ch = curl_init($site);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_HEADER, false);
- $html = curl_exec($ch);
- curl_close($ch);
- echo $html; // Выведет код страницы
- $log = fopen("result.txt","at");
- fwrite($log,"$html");
- fclose($log);
- sendTelegram(
- 'sendMessage',
- array(
- 'chat_id' => TELEGRAM_CHATID,
- 'text' => $html
- )
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement