You need to do it with server side scripting. You can make an API to send a message to other device and the same webservice can be useful to send message to mobile devices. If you are using PHP on server side, you can follow following links:
iOS : https://www.raywenderlich.com/123862/push-notifications-tutorial
Android : sending push notifications to multiple android devices using GCM
Feel free to ask any further queries if you have.....
EDIT :
You need to communicate to APNS for apple and GCM for android to send a push notification....
To communicate with APNS you would require a .pem file. Please refer this link to get assistance of creation of pem file.
Generate .pem file Used to setup Apple PUSH Notification
Moreover, as per my knowledge, the only way to send push notification is to call a webservice. everything needs to be done on server side.
To send a notification to website, Please refer following links:
- https://onesignal.com/ (Fully Free | Support mobile + browser)
- https://clevertap.com/ (Has free plan)
- https://goroost.com/