In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Php curl how to set up cookie, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Php curl sets cookie method: 1, create PHP sample file; 2, set cURL transmission options through curl_setopt function; 3, pass cookie in CURL.
This article operating environment: Windows7 system, PHP7.1 version, DELL G3 computer.
How does php curl set up cookie?
The method and steps of passing cookie in PHP CURL
How do I use curl's cookie? Beginners are very headache, curl parameters are too many, of which the cookie part involves 4.
Of course, it is clearly stated in the manual that there are three cookie for curl, but there is also a parameter for header, which can include cookie.
Curl is very easy to use. The most important thing is to be familiar with the use of curl_setopt.
Curl_setopt ($ch, CURLOPT_COOKIE, $cookie)
The cookie value here should be used; separate, not with &. There is no need to use urlencode coding, of course, coding is better.
$cookie = "axibacteric caterpillar name = Fang Shiyu"
Note that when using this, not curl_setopt ($ch, CURLOPT_HTTPHEADER, $header)
The $header of contains the Cookie parameter, otherwise it will overlap, resulting in an unforeseen situation in the cookie.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.