<?php
// Load composer
require '/phplibs/vendor/autoload.php';
// Instantiate the client with the project api_token and sender_id.
$client = new \Fcm\FcmClient("server token","sender ID);
// Instantiate the push notification request object.
$notification = new \Fcm\Push\Notification();
// Enhance the notification object with our custom options.
$notification
->addRecipient("user token")
->setTitle('Hello from php-fcm!')
->setBody('Notification body');
// Send the notification to the Firebase servers for further handling.
var_dump($client->send($notification));
def do_connect():
import network
sta_if = network.WLAN(network.STA_IF)
if not sta_if.isconnected():
f = open('config.cnf')
lines = f.readlines()
print('connecting to network...')
sta_if.active(True)
sta_if.connect(lines[2],lines[3]);
while not sta_if.isconnected():
pass
print('network config:', sta_if.ifconfig())
{"message":"Current user is not logged in"}
Не я же MiniGW писал
Поставил инклуды в начало файла, не помогло.