PHP Post data with Fsockopen

前端 未结 10 1560
梦如初夏
梦如初夏 2020-12-01 15:20

I am attempting to post data using fsockopen, and then returning the result. Here is my current code:



        
10条回答
  •  悲&欢浪女
    2020-12-01 15:53

    At no point is $data being written to the socket. You want to add something like:

    $out .= "Connection: Close\r\n\r\n";
    fwrite($fp, $out);
    fwrite($fp, $data);
    

提交回复
热议问题