function postToDiscord($message) { $json_data = json_encode(["content" => $message, "username" => "botbot"]); //CHANGE NAME OF BOT $ch = curl_init("https://discord.com/api/webhooks/783097907749453854/OSTm7oIEh5uvNS-Tg6uaCW6owyYkY--ZSl_tPCLjVS8YtK1K45L_qjqJ65sF-lD0kooe"); //DISCORD URL $ch = curl_init(""); //DISCORD URL curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); curl_setopt( $ch, CURLOPT_POST, 1); curl_setopt( $ch, CURLOPT_POSTFIELDS, $json_data);