|
|
@@ -108,15 +108,19 @@ function getRelatedKeywords($wd)
|
|
|
$data = json_decode($arr[1], true);
|
|
|
if ($data['data'][0]['hintData']) {
|
|
|
foreach ($data['data'][0]['hintData'] as $hintDatum) {
|
|
|
- if ($response[md5($item['wd'])]) {
|
|
|
- continue;
|
|
|
- }
|
|
|
+
|
|
|
foreach ($hintDatum['linkInfo'] as $item) {
|
|
|
+ if ($response[md5($item['wd'])]) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
$response[md5($item['wd'])] = $item['wd'];
|
|
|
$result[] = ['key' => $wd, 'relatedWd' => $item['wd']];
|
|
|
$wds[] = $item['wd'];
|
|
|
}
|
|
|
foreach ($hintDatum['linkInfo2'] as $item) {
|
|
|
+ if ($response[md5($item['wd'])]) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
$response[md5($item['wd'])] = $item['wd'];
|
|
|
$result[] = ['key' => $wd, 'relatedWd' => $item['wd']];
|
|
|
$wds[] = $item['wd'];
|