Skip to content

Commit

Permalink
v1.0.5
Browse files Browse the repository at this point in the history
added support for discord webhook
  • Loading branch information
CurryOnPatat committed Jul 19, 2022
1 parent 37399f3 commit 261839b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ Upload to a web server and you successfully installed the emai tracker


if you have suggestions a problem or a question feel free to make a issue


And then change on line 35 in footer.php the discord webhook url to your discord webhook url
19 changes: 13 additions & 6 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,19 @@ function telegram($msg) {
$telegramchatid=yourtelegramchatidhere;
// verstuurd het bericht [english: sends the message to your telegram bot]
telegram ("$txt");
// discord webhook
$url = "https://discordapp.com/api/webhooks/xxxxxxxx";
$headers = [ 'Content-Type: application/json; charset=utf-8' ];
$POST = [ 'username' => 'Email Bot', 'content' => "$file" ];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($POST));
$response = curl_exec($ch);
exit;






?>

0 comments on commit 261839b

Please sign in to comment.