I’ve use Parse to give my iOS and Android App notifications. But I want to do that from my website.
I’ve found this in de docs of Parse:
To send a push notification, send a POST request to https://api.parse.com/1/push with the Content-Type header set to application/json. A simple alert can be sent to Android devices on the global broadcast channel using the following command:
curl -X POST \
-H “X-Parse-Application-Id: ${APPLICATION_ID}” \
-H “X-Parse-REST-API-Key: ${REST_API_KEY}” \
-H “Content-Type: application/json” \
-d ‘{ “channel”: “”, \
"type": "android", \ "expiry": 1451606400, \ "data": { "alert": "greetings programs" } }' \
Who can help me to make a PHP-file to post this ?
Thanks!
Translating your command line curl to PHP you get something along the lines of
UPDATE
With this, your unstated question should be answered. If you still can’t figure out how to do this, you should seriously consider learning yourself some webdev or switch jobs. This is the most basic thing you can do.