7
7
use Monolog \Logger ;
8
8
use Monolog \Handler \StreamHandler ;
9
9
10
-
10
+
11
11
function post2telegram ($ user_id , $ bot_token , $ message ) {
12
12
13
13
$ tgLog = new TgLog ($ bot_token );
@@ -105,17 +105,17 @@ function post2facebookpersonalwall( $app_id, $app_secret, $linkData ) {
105
105
function post2twitter ( $ consumer_key , $ consumer_secret , $ oauth_token , $ oauth_secret , $ message ) {
106
106
107
107
$ connection = new TwitterOAuth ( $ consumer_key , $ consumer_secret , $ oauth_token , $ oauth_secret );
108
-
108
+
109
109
$ content = $ connection ->get ('account/verify_credentials ' );
110
110
111
111
$ connection ->post ('statuses/update ' , array ('status ' => $ message ));
112
112
113
113
if ($ connection ->getLastHttpCode () == 200 ) {
114
-
114
+
115
115
return true ;
116
116
117
117
} else {
118
-
118
+
119
119
return false ;
120
120
121
121
}
@@ -127,7 +127,7 @@ function androidnotification( $api_access_key, $title, $to, $message ) {
127
127
128
128
// prep the bundle
129
129
$ msg = array (
130
- 'body ' => $ texto ,
130
+ 'body ' => $ message ,
131
131
'title ' => $ title ,
132
132
'priority ' => 'high ' ,
133
133
'sound ' => 'default ' ,
@@ -157,14 +157,14 @@ function androidnotification( $api_access_key, $title, $to, $message ) {
157
157
158
158
curl_close ($ ch );
159
159
160
- //Decoding json from result
160
+ //Decoding json from result
161
161
$ res = json_decode ($ result );
162
162
163
163
$ flag = $ res ->success ;
164
164
165
- //if success is 1 means message is sent
165
+ //if success is 1 means message is sent
166
166
if ($ flag == 1 ){
167
-
167
+
168
168
return true ;
169
169
170
170
} else {
@@ -195,7 +195,7 @@ function logit( $logger, $message, $type ) {
195
195
break ;
196
196
}
197
197
198
-
198
+
199
199
200
200
}
201
201
0 commit comments