서비스 종료되었습니다만...
개발자분께서 전체 운영소스를 오픈해주셨습니다.
모바일 앱을 개발하지 않아도 당신 웹사이트 회원의 스마트폰에
무료로 푸시 알림을 보낼 수 있습니다.
파트너 목록에서 제 블로그도 보이네요..^^;;
서비스 문의 및 신청
http://www.pushwing.com/main/communication
위에 주소에 접속하신 후 파트너신청 등록을 하시면 됩니다.
심사 후 아래와 같이 등록완료 메일을 받았습니다.
client id , DB 접속 아이디 비번을 발급 받았습니다.
제로보드 XE 기준으로 적용 시
\modules\board\board.controller.php 파일을 수정하시면 되는데요.
글 작성 시 , 댓글 작성 시
procBoardInsertDocument , procBoardInsertComment 이 두 함수를 수정하셔야 합니다.
저같은 경우에는
if(!$output->toBool()) 소스 윗 부분에 아래 소스들을 추가했습니다.
추가해야할 코드는
신규 글 작성 시 ( procBoardInsertDocument )
if (PHP_VERSION >= '5.1.0') {
//if (function_exists("date_default_timezone_set")) date_default_timezone_set("Asia/Seoul");
date_default_timezone_set("Asia/Seoul");
}
$config["push_server"] = "www.pushwing.com";
$config["mysql_id"] = "디비아이디";
$config["mysql_password"] = "디비 비번";
$config["client_id"] = "클라이언트 코드";
$hp = "휴대폰번호"; // 푸시 받을 휴대폰 번호를 입력합니다.
$subject_msg = $obj->title;
$content_msg = "블로그에 새글이 작성되었습니다. 웹사이트바로가기를 눌러주세요.";
$url = "http://블로그도메인/". $output->get('document_srl');
$idata = array(
"hp" => $hp,
"client_id" => $config["client_id"],
"subject" => $subject_msg,
"contents" => $content_msg,
"url" => $url,
"ymd" => date("ymd"),
"time" => date("H")
);
function send_pushwing($config, $idata)
{
$columns = "";
$values = "";
foreach($idata as $column => $value)
{
$columns .= $column . ", ";
$values .= ("'" . $value . "', ");
}
$con = mysql_connect($config["push_server"], $config["mysql_id"], $config["mysql_password"]);
mysql_select_db("pushwing", $con);
mysql_query("set names utf8");
mysql_query(sprintf("INSERT INTO push_wait (%s timestamp) VALUES (%s UNIX_TIMESTAMP())", $columns, $values));
mysql_close($con);
}
send_pushwing($config,$idata);
코멘트 작성 시 ( procBoardInsertComment )
if (PHP_VERSION >= '5.1.0') {
//if (function_exists("date_default_timezone_set")) date_default_timezone_set("Asia/Seoul");
date_default_timezone_set("Asia/Seoul");
}
$config["push_server"] = "www.pushwing.com";
$config["mysql_id"] = "디비 아이디";
$config["mysql_password"] = "디비 비번";
$config["client_id"] = "클라이언트코드";
$hp = "휴대폰번호"; // 푸시 받을 휴대폰 번호
$subject_msg = $obj->title;
if($subject_msg=="")
{
$subject_msg = "블로그에 새 코멘트가 작성되었습니다. 웹사이트바로가기를 눌러주세요.";
}
$content_msg = "블로그에 새 코멘트가 작성되었습니다. 웹사이트바로가기를 눌러주세요.";
$url = "http://블로그도메인/". $obj->document_srl;
$idata = array(
"hp" => $hp,
"client_id" => $config["client_id"],
"subject" => $subject_msg,
"contents" => $content_msg,
"url" => $url,
"ymd" => date("ymd"),
"time" => date("H")
);
function send_pushwing($config, $idata)
{
$columns = "";
$values = "";
foreach($idata as $column => $value)
{
$columns .= $column . ", ";
$values .= ("'" . $value . "', ");
}
$con = mysql_connect($config["push_server"], $config["mysql_id"], $config["mysql_password"]);
mysql_select_db("pushwing", $con);
mysql_query("set names utf8");
mysql_query(sprintf("INSERT INTO push_wait (%s timestamp) VALUES (%s UNIX_TIMESTAMP())", $columns, $values));
mysql_close($con);
}
send_pushwing($config,$idata);
자, 소스 수정은 다 되었구요.
이제 안드로이드 스마트 폰에서 아래 어플을 설치합니다.
https://play.google.com/store/apps/details?id=com.pushwing
설정을 마치시면 아래와 같이 푸시가 옵니다.
굳이 이제 푸시서비스를 개발 하지 않아도 되겠네요..
기회가 되면 별도 만들어볼수도 있겠지만..
굳이 개인 블로그에 만들고 싶은 생각은..아직 없네요 ㅎㅎ;;
이상입니다!