Skip to content

Commit

Permalink
file_get_contents 8
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxNadeev committed Mar 27, 2024
1 parent 3f81ba4 commit 1f479c5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sender.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,13 @@
$owner = $consts[1];
$dev = $consts[2];

echo "0: "."a"."b";
echo "1: ".$owner.$dev.$apiToken;

function sendTelegram($chat_id, $message, $apiToken) {
$data = [
'chat_id' => substr($chat_id, 0, -1),
'chat_id' => substr($chat_id, 0, -2),
'text' => substr($message, 0, -1),
'parse_mode' => 'HTML'
];
echo "2: ".$data;
echo "data: ".$data;
$response = file_get_contents("https://api.telegram.org/bot".substr($apiToken, 0, -1)."/sendMessage?".http_build_query($data));
};

Expand Down

0 comments on commit 1f479c5

Please sign in to comment.