tim168 / search-engine-rank
Package description here.
Installs: 50
Dependents: 0
Suggesters: 0
Security: 0
Stars: 209
Watchers: 11
Forks: 19
Open Issues: 2
Requires
- jaeger/querylist: ^4.2
- symfony/dom-crawler: ^5.1
This package is auto-updated.
Last update: 2024-12-15 18:00:25 UTC
README
根据关键词获取网站在各大搜索引擎的排名情况
前言
仅供学习交流,切勿商用!
未设置代理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;
目前支持的搜索引擎
搜索原理
License
MIT