로그인 회원가입
홈으로 웹호스팅 커뮤니티 MY웹호스팅관리 포인트충전하기
서버 IP : 192.168.50.8
계좌
test 123456-11-123456 test
대구동신교회 대구동신세계선교회
대구동신교회 중국예배부 중예부나스 행사앨범 예배영상 중예부앨범

준비중입니다


 
작성일 : 21-02-03 19:33
[정보] 잔디(JANDI) 업무용 채팅프로그램 API 연동
 글쓴이 : 관리자
조회 : 2,756  
   http://gnuwiz.com/bbs/board.php?bo_table=plugin_tip&wr_id=13 [1141]
   https://sir.kr/g5_tip/11518?page=13 [976]

그누보드로 돌아가서 API를 연동하는 소스만 넣어주면 끝이 납니다.

본인이 사용하고자 하는 스킨경로에 wriite_update.skin.php 파일을 생성합니다.

(본 작성자는 skin/board/basic 스킨 경로에 write_update.skin.php 파일을 생성 했습니다.)


<?php


if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

 

// 잔디로 보내기 (gnuwiz)

function jandi_post($data)

{

    $data = json_encode($data);


    $headers[] = "Accept: application/vnd.tosslab.jandi-v2+json"; // 신규 API 키

    $headers[] = "Content-type: Application/json";


$url = "위에서 발급받은 Webhook URL을 넣어 줍니다."; // API URL


    $curl = curl_init();


    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);

    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

    curl_setopt($curl, CURLOPT_URL, $url);

    curl_setopt($curl, CURLOPT_POST, true);

    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);

    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);

    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);

    curl_setopt($curl, CURLOPT_VERBOSE, true);


    $response = curl_exec($curl);


    curl_close($curl);


    $response = json_decode($response, true);


    return $response;

}


if ($w == '') { // 새글 작성일 경우에만 API 사용

$data = array();

$data['body'] = "[[{$config['cf_title']}]](".G5_BBS_URL."/board.php?bo_table=".$bo_table."&amp;wr_id=".$wr_id.") 게시글이 등록되었습니다.";

$data['connectColor'] = "#FAC11B";

$data['connectInfo'][] = array("title" => $wr_subject, "description" => $wr_content);


$response = jandi_post($data); // 잔디로 전송

}

?>


 
   
 

 
대표:박성준 서버관리자 이메일sungjun9@chol.com

select count(*) as cnt from g4_login where lo_ip = '3.14.73.229'

145 : Table './cmsmanager/g4_login' is marked as crashed and should be repaired

error file : /bbs/board.php