penven

博客园 首页 新随笔 联系 订阅 管理

2023年5月16日 #

摘要: Guzzle 发起并发请求 方式一 发起固定数量请求 use GuzzleHttp\Client; use GuzzleHttp\Promise\Utils; $client = new Client(); // 启动每个请求但不阻止(block) $promises = [ 'image' => 阅读全文
posted @ 2023-05-16 19:11 penven 阅读(409) 评论(0) 推荐(0) 编辑

摘要: Guzzle 流式下载数据/图片 use GuzzleHttp\Client; $client = new Client(); $response = $client->get('https://baidu.com/?p=%E6%B5%8B%E8%AF%95', ['stream' => true] 阅读全文
posted @ 2023-05-16 16:56 penven 阅读(374) 评论(0) 推荐(0) 编辑