curl模拟访问已经存在的cookie

Posted archoncap

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了curl模拟访问已经存在的cookie相关的知识,希望对你有一定的参考价值。

curl http://i.meituan.com/brunch/order?status=2 -H Pragma: no-cache -H Accept-Encoding: gzip, deflate -H Accept-Language: zh-CN,zh;q=0.8 -H User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (Khtml, like Gecko) Chrome/60.0.3112.90 Safari/537.36 -H Accept: */* -H Referer: http://i.meituan.com/brunch/order?status=2 -H X-Requested-With: XMLHttpRequest -H Cookie: _lxsdk=15df4e62a9e71-01bb01166a5be3-5c1b3517-19fa51-15df4e62a9fc8; JSESSIONID=6i4l8xwv3pba6fyjf3w27wkl; IJSESSIONID=6i4l8xwv3pba6fyjf3w27wkl; iuuid=08F69E9DB8DB5B00D08D0D00E1C20399AB9A1965A8B5AEF4014FFC67F0B879DC; backurl=http://i.meituan.com/account; mtcdn=K; webp=1; isid=A42B854F6AAD7C41BEF03DDB14835354; oops=shYVkiCAHfJnbuJtbaK5_e3SBMcAAAAAhwQAALsh_EBhiJ1F5ikrJ5KOWnVju_n_Ix9fZ_c05ER_uMZUeeLUVIUyFCaMvoVa1qi0IA; logintype=fast; latlng=; i_extend=GimthomepagemineH__a100001__b2; idau=1; __utma=74597006.2019490986.1503052314.1503052314.1503106862.2; __utmb=74597006.3.9.1503106865454; __utmc=74597006; __utmz=74597006.1503052314.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); u=55615166; ci=73; cityname="%E9%83%91%E5%B7%9E"; client-id=5bf7de85-6b4b-4937-a437-d25ad1bdf2ff; ip=117.158.4.97; _lxsdk_s=e3eb376a3f03ebf3545b31ad9364%7C%7C13; __mta=153950727.1498287701914.1503106956076.1503107067312.66 -H Connection: keep-alive -H Cache-Control: no-cache --compressed

 

以上是关于curl模拟访问已经存在的cookie的主要内容,如果未能解决你的问题,请参考以下文章

怎样用php中的curl模拟登陆

PHP 如何带上cookies模拟GET表单提交

PHP培训 CURL模拟登录

PHP CURL模拟登陆

curl详解

使用curl进行模拟登录