Skip to content

Instantly share code, notes, and snippets.

@matishsiao
matishsiao / slack.php
Created February 24, 2017 08:21 — forked from uberswe/slack.php
Post updates to Slack with PHP
$message = "Hello this is a test!"; // The message you would like to send
$parameters = array(
'channel' => 'testing', // Simply type your channel name, make sure your bot is invited
'text' => html_entity_decode($message), // Good idea to decode
'as_user' => 'true');
// Use groups.list if you run into channel_not_found issues with private channels, make sure your bot is invited
$url = "https://slack.com/api/"."chat.postMessage"; // chat.postMessage is the method
$parameters['token'] = "MY-API-TOKEN"; // replace MY-API-TOKEN with the API Token for your bot
package main
import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
"strings"
@matishsiao
matishsiao / proxy.go
Last active August 29, 2015 14:11 — forked from vmihailenco/proxy.go
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"