Home > php教程 > PHP源码 > php获取淘宝排行榜搜索热门前30名的关键词+案例

php获取淘宝排行榜搜索热门前30名的关键词+案例

PHP中文网
Release: 2016-05-25 17:11:50
Original
1161 people have browsed it

跳至

<?php
$url="http://top.taobao.com/level3.php?cat=16&show=focus&up=false";
$urltext=strip_tags(file_get_contents($url));
$arr=explode("升降位次",$urltext);
$arr=explode("下一页",$arr[1]);
$arr=explode("\n",$arr[0]);
foreach($arr as $v){$arrnew[]=trim($v);}
$newarr=array_values(array_filter($arrnew));
for($i=1;$i
Copy after login

                   

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template