네이트 팀룸에 메시지 전송

· 2016-09-20 (화) 12:40:20 · 4305 · 3

[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개

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

개발자팁

5,403건

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

+
분류 제목 글쓴이 날짜 조회
PHP 16-10-10 조회 3,833
PHP 16-10-10 조회 3,478
PHP 16-10-06 조회 3,471
PHP 16-10-06 조회 4,707
PHP 16-10-06 조회 3,591
PHP 16-09-28 조회 3,514
jQuery 16-09-28 조회 4,648
PHP 16-09-27 조회 3,297
PHP 16-09-27 조회 4,531
웹서버 16-09-27 조회 3,547
JavaScript 16-09-23 조회 4,170
기타 16-09-20 조회 4,925
PHP 16-09-20 조회 4,306
기타 16-09-19 조회 5,412
JavaScript 16-09-17 조회 3,653
웹서버 16-09-15 조회 3,459
기타 16-09-01 조회 3,947
JavaScript 16-08-30 조회 3,507
node.js 16-08-23 조회 4,234
jQuery 16-08-21 조회 3,877
JavaScript 16-08-18 조회 5,444
PHP 16-08-11 조회 3,625
PHP 16-08-10 조회 4,046
JavaScript 16-08-09 조회 6,154
jQuery 16-08-05 조회 5,224
PHP 16-08-05 조회 1.5만
PHP 16-08-04 조회 7,250
jQuery 16-08-03 조회 3,859
PHP 16-08-03 조회 3,236
JavaScript 16-08-03 조회 6,423