Skip to content

Commit

Permalink
file_get_contents 5
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxNadeev committed Mar 27, 2024
1 parent ec815e2 commit ad9eafb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sender.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@
$conststxt = file_get_contents('consts.txt');
$consts = explode("\n", $conststxt);

$apiToken = substr($consts[0], 0, -1);
$owner = substr($consts[1], 0, -1);
$dev = substr($consts[2], 0, -1);
$apiToken = $consts[0];
$owner = $consts[1];
$dev = $consts[2];

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

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

sendTelegram($dev, $message, $apiToken);
Expand Down

0 comments on commit ad9eafb

Please sign in to comment.