php curl content-length,CURL POST 请求 返回 Length Required

3

2015-09-16 03:04:17 +08:00

header ("Content-type: text/html; charset=utf-8");

ini_set ('display_errors','on');

error_reporting (E_ALL );

ini_set ('memory_limit','10M');

$url="http://xin123.cc/bbs/book_list.aspx?action=new&siteid=1000";

$qd_url="http://xin123.cc/signin/Signin.aspx?Action=index&Mod=Signin&siteid=1000";

$cookie = 'sidxin123=6C24EE628EF9AF160_8_68_37964_500100-2-0-0-0-600';

$data="content=月饼&FaceSelect=1.gif&g=签到";

$ch = curl_init ();

curl_setopt ($ch,CURLOPT_URL,$qd_url );

curl_setopt ($ch,CURLOPT_HEADER,true );

curl_setopt ($ch,CURLOPT_POST,true );

curl_setopt ($ch,CURLOPT_POSTFIELDS,$data );

curl_setopt ($ch,CURLOPT_COOKIE,$cookie );

curl_setopt ($ch,CURLOPT_RETURNTRANSFER,false );

curl_exec ($ch );

curl_close ($ch );

以上代码测试得到

HTTP/1.1 200 OK

Cache-Control: no-cache

Pragma: no-cache

Content-Length: 11900

Content-Type: text/html; charset=utf-8

Expires: -1

Server: Microsoft-IIS/8.0

X-AspNet-Version: 2.0.50727

Set-Cookie: ASP.NET_SessionId=wk1vytudkv1azf55vjd5cbnj; path=/; HttpOnly

Set-Cookie: GUID=409df51603005952; expires=Thu, 15-Sep-2016 19:00:59 GMT; path=/

X-Powered-By: ASP.NET

Date: Tue, 15 Sep 2015 19:00:59 GMT

(内容略)

于是问题在哪?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值