Hi,
I'm a relative PHP newbie implementing a PayPal IPN listener and all seems to be working fine, except I dont really know how to check for a response code.
I've tried something ugly with cURL but it doesn't work at all (I'm not understanding cURL).
I've tried this piece of code that I grabbed from somewhere on the net:
$fp = fsockopen('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);
$response_headers = get_headers($fp);
$response_code = (int)substr($headers[0], 9, 3);
... but it's not working (returns $response_code = 0).
So right now, I'm debugging my IPN code without checking for a Response 200.
Can anyone more experienced advise me on what's the proper/simple way to check this?
Thanks