2
votes

What advantages does one have over the other? Paypal recommends using fsockopen however there are many scripts on the internet which use curl.

Which one shall I use?

Curl: http://www.namepros.com/code/306043-process-paypal-ipn-with-curl.html

fsockopen: https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNImplementation

1

1 Answers

-2
votes

I don't really think it matters one way or another, except that in certain Apache2 installs there could be either availability issues (Curl is not installed) or OpenSSL double initialization problems (Curl's SSL initialization fails because OpenSSL has already initialized).

Recent Apache/PHP setups solved this issue but for a good little while the default Apache2/PHP/Curl installs on Debian wouldn't work properly, and the PHP streams options (fsockopen, file_get_contents`) would always work, so I think that the docs (updated in July 2010, if the date on the doc is right, which means it was written even earlier) may just be trying to keep it simple.