pushbullet 푸시 발송

· 10년 전 · 1053

api가 쉽게 되어있어 급하게 만들어 보았습니다.

 

 

# pushbullet.class.php
[code]

<?php

class oh_push {

 

var $token_key;

var $push_url = 'https://api.pushbullet.com/v2/pushes';

 

public function __construct($token_key) {

$this->token_key = $token_key;

}

 

public function token() {

return $this->token_key;

}

 

public function send($email=array(), $body='', $title='') {

 

$type = 'note';

foreach($email as $k=>$v) {

 

$push_param = 'type='.$type.'&email='.$v.'&title='.$title.'&body='.$body;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $this->push_url);

curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, $push_param);

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Access-Token: '.$this->token_key));

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);

curl_close($ch);

}

}

}

 

$oh_push = new oh_push('토큰키');

$oh_push->send(array('이메일'), '내용', '제목');

[/code]

 

 

토큰은 푸시불렛의 셋팅에서 받을수 있습니다.

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

태그 필터 (최대 3개) 전체 개발자 소스 기타 mysql 팁자료실 javascript php linux flash 정규표현식 jquery node.js mobile 웹서버 os 프로그램 강좌 썸네일 이미지관련 도로명주소 그누보드5 기획자 견적서 계약서 기획서 마케팅 제안서 seo 통계 서식 통계자료 퍼블리셔 html css 반응형 웹접근성 퍼블리싱 표준화 반응형웹 홈페이지기초 부트스트랩 angularjs 포럼 스크린리더 센스리더 개발자톡 개발자팁 퍼블리셔톡 퍼블리셔팁 기획자톡 기획자팁 프로그램강좌 퍼블리싱강좌
+
제목 글쓴이 날짜 조회
10년 전 조회 752
10년 전 조회 684
10년 전 조회 788
10년 전 조회 723
10년 전 조회 658
10년 전 조회 640
10년 전 조회 661
10년 전 조회 630
10년 전 조회 653
10년 전 조회 686
10년 전 조회 646
10년 전 조회 683
10년 전 조회 659
10년 전 조회 738
10년 전 조회 846
10년 전 조회 786
10년 전 조회 770
10년 전 조회 661
10년 전 조회 781
10년 전 조회 679
10년 전 조회 708
10년 전 조회 679
10년 전 조회 658
10년 전 조회 628
10년 전 조회 666
10년 전 조회 751
10년 전 조회 690
10년 전 조회 794
10년 전 조회 684
10년 전 조회 715
10년 전 조회 683
10년 전 조회 751
10년 전 조회 827
10년 전 조회 918
10년 전 조회 685
10년 전 조회 779
10년 전 조회 676
10년 전 조회 633
10년 전 조회 639
10년 전 조회 795
10년 전 조회 701
10년 전 조회 681
10년 전 조회 681
10년 전 조회 841
10년 전 조회 824
10년 전 조회 1,328
10년 전 조회 721
10년 전 조회 797
10년 전 조회 713
10년 전 조회 1,054
10년 전 조회 752
10년 전 조회 765
10년 전 조회 702
10년 전 조회 683
10년 전 조회 934
10년 전 조회 854
10년 전 조회 662
10년 전 조회 754
10년 전 조회 889
10년 전 조회 607
10년 전 조회 674
10년 전 조회 669
10년 전 조회 1,113
10년 전 조회 779
10년 전 조회 809
10년 전 조회 771
10년 전 조회 770
10년 전 조회 1,018
10년 전 조회 902
10년 전 조회 864
10년 전 조회 813
10년 전 조회 834
10년 전 조회 826
10년 전 조회 749
10년 전 조회 1,233
10년 전 조회 756
10년 전 조회 741
10년 전 조회 973
10년 전 조회 756
10년 전 조회 811
10년 전 조회 674
10년 전 조회 937
10년 전 조회 741
10년 전 조회 651
10년 전 조회 715
10년 전 조회 1,402
10년 전 조회 768
10년 전 조회 756
10년 전 조회 747
10년 전 조회 911
10년 전 조회 1,317
10년 전 조회 901
10년 전 조회 777
10년 전 조회 691
10년 전 조회 743
10년 전 조회 805
10년 전 조회 745
10년 전 조회 809
10년 전 조회 719
10년 전 조회 874