Curlopt_postfields and Curlopt_httpheader
One, Curlopt_httpheader: Sets an array of contents to be transferred in a header.
curl_setopt ($ch, Curlopt_httpheader, Array ("range:bytes=0-50\notherheader:stuff\n"));
curl_setopt ($ch, Curlopt_httpheader,array ("host:act.*.qq.com"));
Equivalent:
172.23.129.* act.*.qq.com
Two, Curlopt_postfields: a string that passes all the data as an HTTP "POST" operation.
curl_setopt ($ch, Curlopt_postfields, ' body=gfdfgdfgasdfgdfgdfgdfg& Followup=672709&rootid=127437&star =58&totalusetable=dv_bbs3& amp; username=→→ expendables →&signflag=1&total=65535 ');
The "POST" operation in HTTP. If you want to transfer a file, you need a filename at the start of the @
Therefore, these two parameters as a curl call method should coexist.
Reference:
http://blog.csdn.net/liuxinmingcode/article/details/8043150
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.