php curl post带header 信息
$header[]= 'Host: www.91xiaozao.com'; $header[]= 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0'; $header[]= 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; $header[]= 'Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3'; $header[]= 'Referer: http://www.91xiaozao.com/index.php'; $header[]= 'Cookie: PHPSESSID=9vor6b3ltjkiu5o45in99cvmg5; TP_userid=czoxOiIxIjs%3D; TP_username=czo0OiJ0ZXN0Ijs%3D'; $header[]= 'Connection: keep-alive'; $url='http://www.91xiaozao.com/index.php/home/index'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); $fields = array('lname'=>'justcoding'); curl_setopt($ch, CURLOPT_POSTFIELDS,$fields); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,CURLOPT_HTTPHEADER,$header); echo $result = curl_exec($ch);
相关推荐
kentrl 2020-11-10
咻咻ing 2020-07-04
wghou 2020-06-16
zkwgpp 2020-06-14
xiechao000 2020-05-18
woniyu 2020-05-14
ysmh00 2020-05-14
0与的世界 2020-04-28
worldkun 2020-05-10
carolAnn 2020-04-20
zengni 2020-02-29
hygbuaa 2020-02-26
zhaolisha 2020-02-24
server { listen 80; server_name ××××.com; access_log /×××/×××/nginx/log/access.log; error_log /×××/×
咻咻ing 2020-02-02
JF0 2020-01-31
OwenJi 2020-01-17
webfullStack 2020-01-10