function send_slack($wiadomosc,$adresat){ // Create a constant to store your Slack URL define('SLACK_WEBHOOK', 'https://hooks.slack.com/services/*****************************************'); // Make your message 'channel' => $adresat, 'username' => '***********', 'link_names' => true ))); // Use curl to send your message $c = curl_init(SLACK_WEBHOOK); curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_POSTFIELDS, $message); $a = curl_exec($c); curl_close($c); }
Po wysłaniu wiadomości mam przekierowanie na inną stronę:
header("Location: ***********");
NIestety funkcja wysyłająca wiadomość na slack po poprawnym wysłaniu wyświetla mi "OK" i przez to nie działa funkcja header. Czy wiecie jak wyłączyć potwierdzenie wysłania lub obejść to potwierdzenie?