탈

네이트 팀룸에 메시지 전송

[code]

function nateon_teamroom($msg) {

$webhook = '웹훅주소';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $webhook); // Webhook URL
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
curl_setopt($ch, CURLOPT_POSTFIELDS, 'content='.urlencode($msg)); // 메시지
$return = curl_exec($ch);
curl_close($ch);
}

[/code]

|

댓글 3개

어헛.... 이것은 어떻게 써먹는 것인가요?
네이트 사이트에 가보아도 별다른 내용은 없던데요...
네이트 데브스퀘어 접속도 안되네요
아 사용법 확인하였습니다. 좋은정보 감사합니다 ^^
ㅎㅎㅎㅎㅎ
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
PHP 16-10-10 조회 3,855
PHP 16-10-10 조회 3,490
PHP 16-10-06 조회 3,495
PHP 16-10-06 조회 4,722
PHP 16-10-06 조회 3,609
PHP 16-09-28 조회 3,531
jQuery 16-09-28 조회 4,663
PHP 16-09-27 조회 3,317
PHP 16-09-27 조회 4,542
웹서버 16-09-27 조회 3,574
JavaScript 16-09-23 조회 4,192
기타 16-09-20 조회 4,960
PHP 16-09-20 조회 4,365
기타 16-09-19 조회 5,428
JavaScript 16-09-17 조회 3,672
웹서버 16-09-15 조회 3,483
기타 16-09-01 조회 3,963
JavaScript 16-08-30 조회 3,528
node.js 16-08-23 조회 4,251
jQuery 16-08-21 조회 3,895
JavaScript 16-08-18 조회 5,461
PHP 16-08-11 조회 3,640
PHP 16-08-10 조회 4,066
JavaScript 16-08-09 조회 6,171
jQuery 16-08-05 조회 5,245
PHP 16-08-05 조회 1.5만
PHP 16-08-04 조회 7,277
jQuery 16-08-03 조회 3,884
PHP 16-08-03 조회 3,254
JavaScript 16-08-03 조회 6,446