im want to use curl with php to send push-messages to an ionic-app. this is my command im using on the commandline:
curl -X POST -H "Authorization: Bearer XXXXXX.AUTH.XXXXXXX" -H "Content-Type: application/json" -d '{
"tokens": ["XXXX.DEVICE_TOKEN.XXXX"],
"profile": "XXXX.PROFILE.XXXXX",
"notification": {
"message": "This is a test-message",
"title": "This is a Test Title"
}
}' "https://api.ionic.io/push/notifications"
how can i execute this command in php? i found some examples, but none of them works.