Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $message = "Tes kirim ke Slack :)";
- $data = "payload=" . json_encode(array(
- "channel" => "#error_notifications",
- "text" => $message,
- "username" => 'Pemberi Tahu',
- "icon_url" => 'URL Foto/Icon'
- ));
- $ch = curl_init("URL WebHook");
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
- curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $result = curl_exec($ch);
- curl_close($ch);
Advertisement
Add Comment
Please, Sign In to add comment