0
我使用卷曲来获取网页的内容..当我使用浏览器访问它们时,网站设置cookie ..可以使用CURL请求在请求时设置cookie吗?
我可以使用cURL相同的方式并使用cookie向该特定网站发送请求信息...????
我使用卷曲来获取网页的内容..当我使用浏览器访问它们时,网站设置cookie ..可以使用CURL请求在请求时设置cookie吗?
我可以使用cURL相同的方式并使用cookie向该特定网站发送请求信息...????
以下是我发现的有关卷曲和饼干的一些选项。
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt'); //use this cookie file
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookie.jar'); //if you close the session the cookies will be saved here
curl_setopt($ch, CURLOPT_COOKIE,"cookie_test=yes; domain=.google.com; path=/"); //set the cookie for the current session