<?php
require_once __DIR__ . '/vendor/autoload.php';
use phpFCMv1\Client;
use phpFCMv1\Config;
use phpFCMv1\Notification;
use phpFCMv1\Recipient;
$client = new Client('service_account.json');
$recipient = new Recipient();
$notification = new Notification();
$config = new Config();
//-----------$config -> setImage(self::TEST_IMAGE);
$title = 'Test';
$tex = 'Test from Web';
$TEST_TOPIC = '123456';
$recipient -> setTopicRecipient( $TEST_TOPIC);
$notification -> setNotification($title ,$tex );
$config -> setPriority(Config::PRIORITY_HIGH);
$client -> build($recipient, $notification, null, $config);
$result = $client -> fire();
echo $result;
?>