<?php
$token = "bot448828288:AAGiqKvcNpZWvwrGNrRkpiETihFhIVpWtQA";
$chatid = "@cointweets";
$text = "Hello!";
$chat_id = @cointweets;
$text = 'your text goes here';
$disable_web_page_preview = null;
$reply_to_message_id = null;
$reply_markup = null;
$data = array(
'chat_id' => urlencode($chat_id),
'text' => urlencode($text),
'disable_web_page_preview' => urlencode($disable_web_page_preview),
'reply_to_message_id' => urlencode($reply_to_message_id),
'reply_markup' => urlencode($reply_markup)
);
$url = https://api.telegram.org/bot448828288:AAGiqKvcNpZWvwrGNrRkpiETihFhIVpWtQA/sendMessage;
// open connection
$ch = curl_init();
// set the url
curl_setopt($ch, CURLOPT_URL, $url);
// number of POST vars
curl_setopt($ch, CURLOPT_POST, count($fields));
// POST data
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
// To display result of curl
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// execute post
$result = curl_exec($ch);
// close connection
curl_close($ch);
?>
- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
- Parse error: syntax error, unexpected ':' in /in/jT8Tr on line 22
Process exited with code 255.
preferences:
193.16 ms | 1399 KiB | 36 Q