Phpservermon: [Feature Request] Support for notifications via Discord

Created on 18 Jul 2018  路  5Comments  路  Source: phpservermon/phpservermon

More info here

Some Example Code:

function postToDiscord($message, $username = "PHP Server Monitor", $avatar = null){
    $data = array("content" => $message, "username" => $username, "avatar_url" => $avatar);
    $curl = curl_init("https://discordapp.com/api/webhooks/<WEB HOOK KEY HERE>");
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    return curl_exec($curl);
}
enhancement help wanted

All 5 comments

I have been writing a Package that will interact with Slack and Discord as well as other services using Webhooks. Once I have it up and running, Ill see about adding it to the project.

I am working on webhooks with my fork :)

Any updates ?

I gave up it's language and frameworks I do not understand... Got other stuff to work on :+1:

will wait for another genius to figure it out :nerd_face:

971 added support for Discord!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joubertredrat picture joubertredrat  路  8Comments

pieter-groeneweg picture pieter-groeneweg  路  3Comments

sadortun picture sadortun  路  4Comments

djexthreme picture djexthreme  路  4Comments

yalgva picture yalgva  路  7Comments