File Manager
Editing: test-fcm.php
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); require 'includes/firebase.php'; // Initialize Firebase with your JSON key $firebase = new FirebasePush(__DIR__ . '/includes/eizon-a8ee5-firebase-adminsdk-fbsvc-8e8ee1e9db.json'); // Example: send to a single device token (replace with a real token) $token = 'ekYy6-cJTFCa2hOdc9hWVd:APA91bEyBjvBaXhjoMN3Nhq5Z6z6Sv7fAS_OiHwXQ5Gr1tuh8IcnihFIZnKPYnGOmA5FZPoD7SHaCxE-QCzqG5yKXLD3gnDs49_luBuyZ3JuMUlPI3kIKnU'; $response = $firebase->sendToDevice( $token, 'Hello from EIZON!', 'This is a test notification via FCM v1', ['url' => '/home'] ); print_r($response);
💾 Save
⬅ Back