PHP 抓取网站前三层链接代码 - SEO优化
0) {
if($pathLevels[0] == "") {
$result[] = $baseUrl . $linkParts["path"];
} else {
$result[] = $basePath . $linkParts["path"];
}
}
}
}
}
$result = array_unique($result);
$result = array_slice($result, 0, 3);
}
echo json_encode($result);
?>
原文地址: https://www.cveoy.top/t/topic/mrzt 著作权归作者所有。请勿转载和采集!