我正在对Paypal IPN系统做出响应
我想送一份
"HTTP/1.1 200 OK“
在我发送带有数据的php curl之前
我想我也应该用php curl (而不是header("HTTP/1.1 200 OK"); )来做这个。
有人能给我提供密码吗?还是标题没问题?
发布于 2016-12-14 12:00:45
 function curl()
    {
      $ch = curl_init();
      $data = array(
      "Content-type: ,
      "POST /your api curl method HTTP/1.1",
      "Accept: ",
      "Host: "host url",
      "Content-length: your param length
       );
       curl_setopt($ch, CURLOPT_POST, true);
       curl_setopt($ch, CURLOPT_URL, post url here);
       curl_setopt($ch, CURLOPT_HTTPHEADER, $data);
       curl_setopt($ch, CURLOPT_POSTFIELDS, post param here );
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
       $output = curl_exec($ch);
       $err = curl_error($ch);
       curl_close($ch);
       return $output;
    }应该在标头中发送
https://stackoverflow.com/questions/41142013
复制相似问题