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);
}
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: