astro/searchengine

Google 搜索爬虫

1.0.1 2022-02-12 13:14 UTC

This package is auto-updated.

Last update: 2024-09-12 18:49:46 UTC


README

爬取 google.com 和 google.ae

安装

使用 composer composer 安装 searchengine。

composer require astro/searchengine

用法

创建一个新的测试 PHP 文件

<?php 
namespace Astro;

require_once './vendor/autoload.php';

#create new instance
$client = new SearchEngine();

#set search engine (google.com or google.ae)
$client->setEngine("google.ae");

#enter search keywords
$results = $client->search(["amazon","tuna"]);

#print the results
print_r($results);
?>

运行你的 PHP 文件。

php test.php

许可

MIT