ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` ~~~ public function setCookieString($string) { $result = array(); if(preg_match_all('/\s*([^;=]+)=([^;]+)/i',$string,$matches) > 0){ if(isset($matches[1]) && isset($matches[2])){ if(count($matches[1]) == count($matches[2])){ foreach ($matches[1] as $handle => $key) { $result[$key] = $matches[2][$handle]; } } } } return $result; } public function getcoook() { $c='cna=KN4hFpJyFSwCASridJaaBiFo; miid=151025336250406639; isg=BH19AkGewNL4lmVJTbagqJ3ej9l3GrFsEwEgAT_CuVQDdp2oB2rBPEsuJCowbckk; tfstk=cvxhBoxE8e7Q0T3NDDsBCw9TJxGOaTrPi3-6bnj8jGqB4-tNQsVQ7rrGVAfnIc45.; l=eBxWZsvgjMuKHfNtBOfahurza77OSIOYYuPzaNbMiOCP_X5e5RBlW6FFd3TwC31Vh6AXR3J5Q7y2BeYBqBOInxvtIosM_Ckmn; sgcookie=E100tPyoi%2FODJ7rycxu5OUfVowJe%2FlogYPRXL6IfMY9hkH3eMZR50X1Tt3geFziiLcE%2FOYK9fvYyzu7vSBafgOkvic3tk%2BUQvPuzrl6uvyLNGRg%3D; tracknick=%5Cu4E1C%5Cu98CEit; _cc_=URm48syIZQ%3D%3D; thw=cn; x=e%3D1%26p%3D*%26s%3D0%26c%3D0%26f%3D0%26g%3D0%26t%3D0; enc=jPcV09pv7qGNFL%2FaIKMnVrNZ%2F8j4PsBABgB8rkXkf19nCcMoVM97EsO0DqGNYNBg7qp4P1fz20gQ9Ma%2BMQ5I%2FyEHdF7tDbtuQjllAJXwlws%3D; hng=CN%7Czh-CN%7CCNY%7C156; t=799891fe3da4154a762710ae46ec069d; _m_h5_tk=c642fbe567cc7a20fa05a980754921d5_1632564490724; _m_h5_tk_enc=6aba7afc14c750c941efef0c84995c49; xlly_s=1'; $co = $this->setCookieString($c); $client = new \GuzzleHttp\Client(['cookie'=>true]); $jara = \GuzzleHttp\Cookie\CookieJar::fromArray($co, 'www.taoao.com'); //dump($jara);exit; $request = $client->request('GET', 'https://www.taoao.com', [ 'cookies' => $jara ]); dump($request); } ~~~ ```