It looks like you need to add "ssl://" to the front of the url to use ssl for an fsockopen call. Other than that it looks correct.
I think you can still use www.paypal.com but if you read you should use ipnpb.paypal.com then that should work as well.