pushbullet 푸시 발송

· 10년 전 · 1080

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년 전 조회 765
10년 전 조회 702
10년 전 조회 808
10년 전 조회 736
10년 전 조회 678
10년 전 조회 654
10년 전 조회 676
10년 전 조회 648
10년 전 조회 670
10년 전 조회 700
10년 전 조회 662
10년 전 조회 698
10년 전 조회 674
10년 전 조회 749
10년 전 조회 859
10년 전 조회 797
10년 전 조회 782
10년 전 조회 675
10년 전 조회 796
10년 전 조회 696
10년 전 조회 721
10년 전 조회 691
10년 전 조회 668
10년 전 조회 647
10년 전 조회 683
10년 전 조회 769
10년 전 조회 709
10년 전 조회 809
10년 전 조회 699
10년 전 조회 728
10년 전 조회 700
10년 전 조회 764
10년 전 조회 842
10년 전 조회 928
10년 전 조회 701
10년 전 조회 797
10년 전 조회 700
10년 전 조회 651
10년 전 조회 653
10년 전 조회 812
10년 전 조회 723
10년 전 조회 695
10년 전 조회 698
10년 전 조회 865
10년 전 조회 839
10년 전 조회 1,350
10년 전 조회 742
10년 전 조회 817
10년 전 조회 731
10년 전 조회 1,080
10년 전 조회 770
10년 전 조회 785
10년 전 조회 717
10년 전 조회 706
10년 전 조회 949
10년 전 조회 872
10년 전 조회 685
10년 전 조회 772
10년 전 조회 907
10년 전 조회 625
10년 전 조회 700
10년 전 조회 688
10년 전 조회 1,132
10년 전 조회 796
10년 전 조회 831
10년 전 조회 789
10년 전 조회 792
10년 전 조회 1,035
10년 전 조회 924
10년 전 조회 886
10년 전 조회 828
10년 전 조회 858
10년 전 조회 850
10년 전 조회 775
10년 전 조회 1,250
10년 전 조회 770
10년 전 조회 761
10년 전 조회 1,001
10년 전 조회 777
10년 전 조회 833
10년 전 조회 689
10년 전 조회 959
10년 전 조회 763
10년 전 조회 675
10년 전 조회 740
10년 전 조회 1,418
10년 전 조회 782
10년 전 조회 775
10년 전 조회 770
10년 전 조회 933
10년 전 조회 1,338
10년 전 조회 937
10년 전 조회 798
10년 전 조회 725
10년 전 조회 762
10년 전 조회 825
10년 전 조회 762
10년 전 조회 829
10년 전 조회 736
10년 전 조회 899