Firebase app server in php without NPM (Node.js) - php

I am using firebase database for my chat app and now i want to send notification to my app from my server (Without firebase console). So i want to send notification whenever firebase database triggers with related data, As i know so far(May be i am wrong.Please correct me) if i want to listen realtime database trigger i need to use firebase functions and on App server i need to install NPM commend line tool to listen firebase database trigger on app server which later made post request to FCM server for notification.
So, My issue is my server doesn't support NPM and node.js so i can't install and listen change on firebase database from app server. i during my research i came to know few php sdk which send notification but none listen change in firebase database on app server.
Is there any other way around (PHP) which can help me to listen change in firebase database and by this i can make request to FCM server for notifications.
Regards
Ritu

Related

Why use .pem certificate in apple push notification not p12

I am creating a web portal using laravel framework to which one of its functionality is to send remote push notification on IOS App remotely. Many article in the internet is saying that we need the pem certificate file not p12. Why?
My co-worker who is developing the IOS mobile app, says that he is using the p12 certificate to get the push notifications from the Azure portal and successfully send push notification.
Is this because that he is pushing the app locally? Meaning the app directly sends the notification? And I am pushing notifications remotely from the web portal? Is there any difference when pushing the app remotely and locally?
Seems you are using Azure Notification Hubs. In Azure's official tutorial, they are obviously using the .p12 push certificate to configure authentication. So I think you don't need to worry to use it.

Php Notification system and websocket

i'm trying to develop a PHP notification service for a CRM used by my customers.
Scenario: an user add an appointment for a collegue, and this collegue has to receive a notification inside his CRM profile like, for example, Facebook did.
The structure is pretty simple: a PHP Server in listening with the client browser connected with Websockets.
Server: i'm using Ratchet - PHP WebSockets, i've followed the examples and started the server, server that is able now to accept connection and deliver messages to all clients connected or just to one receiver.
Client: a simple JS script, with Websocket connection and method, that handle all receiving messagges and notify all to the user connected.
My point is: i'm guessing to have the websocket client browser just for incoming messagge, i don't want to allow them to send nothing, the send part must be done by the server that has access to DB in this way:
1) FORM Appointment
2) Submit to the server and save it to DB, in this step a client PHP Websocket connect to the Ratchet server and send the notification to the receiver.
3) The Websocket of receiver receive the notification and alarm the customer.
The questions are:
what can i use to do the step 2 with the PHP websocket client to connect with the Websocket server? is good to use Pusher interface like this example suggest: http://socketo.me/docs/push or can i avoid using this system?
how can i handle the idle time of websocket client ? a timer that send a ping like message to client for avoiding the dead of websocket?
-how handle possible down of client side or server side?
THanks to all of you!

Send push messagefrom PHP server on localhost to client on android

We are facing issue with push notification kind of feature in intranet.
we have PHP web server on localhost and client on android application.
We want to keep all devices updated even if there is update form any device.
here we can update server from client using web service but what about server to client notification.
We are using intranet only not internet so is there any push notification facility for such scenario. Because server needs to send update on all android devices if there is any change

Make the Android app as a Server..?

How to make the android app as Server. I installed web server in the Android device and tried to call the service from the php which is the client. Its telling that it is unable to listen to the socket. I Implemented SOAP to send the request from the Php client to the Android server. Any suggestion.>?
Or is there any other method.? other than TCP socket listening.
please read below link fetch data from server to andriod mobile
http://codeoncloud.blogspot.in/2013/07/android-mysql-php-json-tutorial.html

J2ME PHP Push Notification

I want to work on a project which has to do with the server sending notification to the client. The client side is a j2me application and the server side script will be implemented using PHP.
I have found out i can use the push registry API in midp 2.0 for push notifications, but i don't know how to implement this such that a socket connection will be created to the server such that notification can be sent to the client via the socket connection. The notification will then trigger the start of the midlet.
How can i use the push API to create a socket connection between client and server and have notifications sent to the client?
Complete answer is here
In short, there are two ways you might want to do it
Launch the application whenever you receive this "Push SMS"
Launch the application just the next time you receive this 'Push SMS"
For situation (1), you will need to specify this in JAD file. If you do this, the application manager will take necessary steps to launch your application the next time SMS is received.
For situation (2), you will need to write code:
PushRegistry.registerConnection("sms://<port number>","Midlet-Class","*");
The above note of mine would address the issue of launching the application upon incoming SMS. After you launch you can connect to your server and post data or retrieve data. This is a practical way of implementing push for J2ME platform.
But you seem to be wanting to launch the application on incoming network connection; this means you are creating a server socket on the phone and server is trying to establish the connection to the phone applications. I did work in such a situation where the phones were deployed on Motorola's iDen network (pre-2005 era). On such networks, it is possible to assign an IP address to the phone which makes the Push upon incoming network connection feasible. But that's past, on none of the GSM/CDMA networks, atleast at consumer's end, this cannot be supported. Hope it answers your question.
You need to do two things, One you need to listen one port number on the J2ME side for the incoming sms. Next you need to attach one GMS Modem to your computer system, Now send sms using this Modem on a particular port to the mobile you are listening. You can use AT Commands to send SMS.
Please visit this Nokia Link.

Categories