Awesome Open Source
Awesome Open Source

Search-Engine-Rank

根据关键词获取网站在各大搜索引擎的排名情况

Latest Stable Version License Latest Unstable Version composer.lock

README: 中文/English

前言

仅供学习交流,切勿商用!

未设置代理ip的情况下,请谨慎使用!

安装

$ composer require tim168/search-engine-rank

使用

require __DIR__ .'/vendor/autoload.php';

use Tim168\SearchEngineRank\SearchEngineRank;

//关键字
$keyword = '华为';

//查询的页码
$page = 1;

//查询的网址
$url = 'https://www.huawei.com/';

//代理ip(若不设置,默认用本地ip)
$proxy = "112.245.21.58:548";

//超时时间
$timeout = 5;

$rank = SearchEngineRank::getRank(\Tim168\SearchEngineRank\Enum\SearchEngineEnum::PC_360, $keyword, $page, $proxy, $url,$timeout);

//返回排名数组
return $rank;

目前支持的搜索引擎

名称 标示 备注
百度 SearchEngineEnum::PC_BAI_DU pc-bai-du
移动百度 SearchEngineEnum::M_BAI_DU m-bai-du
360 SearchEngineEnum::PC_360 pc-360
搜狗 SearchEngineEnum::PC_SOU_GOU pc-sou-gou

搜索原理

License

MIT

后语

欢迎Star


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
php (16,717
laravel (1,692
search-engine (183
yii2 (157
baidu (73
thinkphp (50
360 (18