To connect to the Paypal sandbox, use this line:
$fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);
not: $fp = fsockopen($url_parsed['host'],"80",$err_num,$err_str,30);
and the IPN response will send the word " VERIFIED "
If you are testing IPP Paypal over SSL, you will need to use ssl://www.sandbox.paypal.com on port 443
source share