改成下边这样还是一样的错误:
$request='POST http://www.fum.com/cp/log/test.do HTTP/1.1'."\r\n".//构造HTTP头
'Host: '.$url_arr['host']."\r\n".
'Content-Length: '.strlen($data)."\r\n".
'Content-Type: application/x-www-form-urlencoded'."\r\n".
'Connection: Keep-Alive'."\r\n\r\n".
$data;

解决方案 »

  1.   

    执行:
    echo $request;结果:
    POST http://www.fum.com/cp/log/test.do HTTP/1.1 Host: www.fum.com Content-Length: 201 Content-Type: application/x-www-form-urlencoded Connection: Keep-Alive chinammabinhua2006-11-28MDIzMzJ8MDA6MTA6MjZ8MjIyMjMzNTIxNTYxMnxBLTI0MHwx是不是除了头文件下边都要用XML格式才能发送?
      

  2.   

    'Content-Type: application/x-www-form-urlencoded'."\r\n".=>
    'Content-Type: text/xml'."\r\n".