php贝宝不会返回任何内容


php paypal is not return anything

我正在用贝宝测试我的网站,看看我是否收到了钱,我的系统是否正在更新

当我要求发送包含POST中所有信息的电子邮件时,我会收到空电子邮件。有人能告诉我我的代码出了什么问题吗

$req = 'cmd=_notify-validate';
$req .= payment_safe_check ($_POST);
$header .= "POST /cgi-bin/webscr HTTP/1.0'r'n";
$header .= "Content-Type: application/x-www-form-urlencoded'r'n";
$header .= "Content-Length: " . strlen($req) . "'r'n'r'n";
$mode = strtolower($paymod_data['PAYMENT_MODE']);
    mail("to email", "subject",serialize($_POST) );

if ($mode == 'test')
{
    $fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);
}
else
{
    $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);
}
if (!$fp)
{
    // HTTP ERROR
    die ("Error");
}
else 
{
    // NO HTTP ERROR
    fputs ( $fp, $header . $req );
    while (!feof($fp))
    {
        $res = fgets ($fp, 1024);
        if (strcmp ($res, "VERIFIED") == 0)
        {
            processing ( $_POST );
        }
        else if (strcmp ($res, "INVALID") == 0)
        {
        }
    }
    fclose ($fp);
}

将var_dump($res)放入while代码中,因为这是变量存在的上下文。