1function postToDiscord()
2{
3 $data = array("content" => "Your Content", "username" => "Webhooks");
4 $curl = curl_init("https://discordapp.com/api/webhooks/YOUR-WEBHOOK-URL-HERE");
5 curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
6 curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
7 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
8 return curl_exec($curl);
9}