Push Notification in Android using Firebase (FCM) and PHP

Creating PHP Project

1. Start WAMP/XAMPP server and navigate to www or htdocs folder and create a folder named firebase inside it. Inside this folder, create a subfolder called notifications
2. Now create a file named notification.php inside notifications folder. This will have Notification class which will help in constructing the notification data payload.
3. Now create index.php and add the following content. This contains the form to fill notification details and CURL request, that is made to the Firebase API.
4. Now go to http://localhost/firebase/notifications/ in your browser and access the PHP console. If you have any port configured to Apache, then don’t forget to use it.

5. You can post notifications from here: Demo Console. You need not to worry about using your own Firebase API key. We do not have any logic to access or store them.

Comments

  1. Nice Article, Blog theme is also very user friendly. Tech information is also good on this blog. Also checkout - Push Notification in App
    Thanks

    ReplyDelete

Post a Comment

Popular posts from this blog

Displaying a flash message after redirect in Codeigniter

What is required for it startup company ?

how to export html data to pdf in angularjs and javascript