```
~~~
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);
}
~~~
```
- extend加入模块
- array_column() expects parameter 1 to be array, object given
- tp5.1安装No input file specified.
- ROOT
- wechatDeveloper
- ThinkLibrary
- 语法错误: unexpected '?'
- Cannot use object of type stdClass as array
- Invalid argument supplied for foreach()
- 常量上传
- 命名空间extend_email_Aindex
- Validate
- 'cross-env' 不是内部或外部命令,也不是可运行的程序
- 内置规则
- composer self-update
- cURL error 60: SSL certificate problem
- GuzzleHttp_Client_cookie_true
- cookies原始字符串转换为数组
- 设置cookie
- apidoc
- 原生安装tp5
- array_unique
- explode
- tp3修改密码
- tp打印SQL
- tp5一对一关联
- allowField
- array_column
- array_key_exists
- array_search
- tp5如何引入自定义函数
- with
- with闭包
- 绑定类
- composer A
- array_filter用回调函数过滤数组中的元素
- array_keys
- array_slice截取前两个
- fetch_assoc
- in_array是否存在指定的值
- is_null
- join
- krsort对数组排序
- array-udiff
- shuffle
- substr
- unset删除多维数组key
- 多维转一维函数
- 数组变成字符串implode
- 数组分割
- 数组取差集
- 随机函数array_rand
- 一维变二维
- 字符串包裹变量
- 字符串汉字截取mb_substr
- 直接使用composer命令
- 安装vendor
- composer命令
- 复制安装
- 空目录安装
- tp5cms
- tp5调试
- tp3调试
- TP5一对一关联
- SQL语句
- 清空数据
- 去重
- 去重保留最小id
- 去重匹配除数字外数据
- 事务
- tp5pdf乱码
- tp5column_tp3getFieldtrue
- php代码在线测试,php在线执行
- parent::_initialize