1. Guzzle 爬取数据
$url = "http://www.zongscan.com/demo333/178.html";
$request = new GuzzleRequest('GET', $url);
$client = new \GuzzleHttp\Client();
$response = $client->send($request, ['timeout' => 5]);
2. 获取页面数据
$content = $response->getBody()->getContents();
3. 将结果转换为数组
$data = json_decode($content,true);
参考:https://www.zongscan.com/demo333/187.html