$message, 'title' => $title, 'vibrate' => 1, 'sound' => 1 // you can also add images, additionalData ); $fields = array( 'registration_ids' => $registrationIds, 'data' => $msg ); $headers = array( 'Authorization: key=' . API_ACCESS_KEY, 'Content-Type: application/json' ); $ch = curl_init(); curl_setopt( $ch,CURLOPT_URL, 'https://android.googleapis.com/gcm/send' ); curl_setopt( $ch,CURLOPT_POST, true ); curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers ); curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true ); curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, false ); curl_setopt( $ch,CURLOPT_POSTFIELDS, json_encode( $fields ) ); $result = curl_exec($ch ); curl_close( $ch ); echo $result; //echo "
";
                        //print_r($set_entries_result);
                        //echo "
"; } // http://docs.ionic.io/v1.0/docs/push-ios-setup // https://www.airpair.com/ionic-framework/posts/push-notifications-using-ionic-framework ?>