Last active
May 29, 2016 04:49
-
-
Save nishinoshake/79b8cf3897a0ac2ce445 to your computer and use it in GitHub Desktop.
PHPからSlackにメッセージ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$slackApiKey = 'wowowowowowowowowowowowowoow'; | |
$text = 'API TEST!'; | |
$text = urlencode($text); | |
$url = "https://slack.com/api/chat.postMessage?token=${slackApiKey}&channel=%23api&text=${text}&as_user=true"; | |
file_get_contents($url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment