I followed the instructions at:
How To Build An Apple Push Notification Provider Server When I run the php script on my MacOSX or on Windows using Parallel desktop,
Your hosting provider probably does not allow outbound connections to ports 2195 and 2196. Most shared hosting providers do not have those ports open. You might need to get a VPS or you can also try UrbanAirship which provides Apple Notification Service integration and is free for a certain limit per month.