I have done apns code for php and objective c from this Apns code
and setup certificate from this link
Sandbox and production apns for sending notification t
A good solution is to use a cloud function like firebase to run the actual apns connection and expose an API for your other backend in the shared hosting. This is what I used when I run in this problem.
Firebase cloud functions are convenient easy to develop and virtually free.
https://firebase.google.com/docs/functions
I'll post my solution to sometimes next week.
Finally i took vps instead of shared hosting. Lucabro's comments helped me to solve. Thanks Lucabro.