Apple Push notification with PHP Ajax Loop

215 views Asked by At

I use ajax and php to call apple push notification, I use looping in html side, and automatically click/call function to my php script that the code is for calling apple push notification by using ajax, so the looping is in HTML side not in php function. and will generate success response or error like these enter image description here

When I still have little subscriber, it working fine, but right now, when I got hundreds of udid in database, it sometimes displaying error connection, but sometime it working fine.

What the problem with my error?

This is the error code enter image description here

1

There are 1 answers

0
jcaron On BEST ANSWER

You're most certainly saturating your server with hundreds of requests. You should ideally have the server do the loop and send the pushes, or at the very least make sure you send all the push requests at once in a single request rather than many different requests.

You'll have to show us your code (both client and server), though, if you need any pointers on how to do that.