outscraper php
v4.0.0
このライブラリは、PHP 言語で記述されたアプリケーションから Outscraper API への便利なアクセスを提供します。コードから Outscraper のサービスを使用できるようにします。
APIドキュメント
Composer を介してバインディングをインストールできます。次のコマンドを実行します。
composer require outscraper/outscraper
バインディングを使用するには、Composer の自動ロードを使用します。
require_once ( ' vendor/autoload.php ' );
Composer を使用したくない場合は、最新リリースをダウンロードできます。次に、バインディングを使用するために、 init.php
ファイルをインクルードします。
require_once ( ' /path/to/outscraper-php/init.php ' );
PHPパッケージページへのリンク
$ client = new OutscraperClient ( " SECRET_API_KEY " );
API キーを作成するためのプロフィール ページへのリンク
「ドイツ、ベルリンのアジア料理レストラン」というクエリで Google MPAS の結果を収集します。
$ results = $ client -> google_maps_search ([ ' asian restaurants Berlin, Germany ' ], ' en ' , ' DE ' );
print_r ( $ results );
自由の女神国定記念物から Google Mpas レビューを収集します。
$ results = $ client -> google_maps_reviews ([
' https://www.google.com/maps/place/Statue+of+Liberty+National+Monument/@40.6892494,-74.0466891,17z/data=!3m1!4b1!4m5!3m4!1s0x89c25090129c363d:0x40c6a5770d25022b!8m2!3d40.6892494!4d-74.0445004 '
], limit: 10 , sort: ' newest ' );
// you can use direct links, IDs, or names as input for query
print_r ( $ results );
ドメインからメールと連絡先をスクレイピングします。
$ results = $ client -> emails_and_contacts ([
' outscraper.com '
]);
print_r ( $ results );
他の例
バグレポートとプルリクエストは、GitHub (https://github.com/outscraper/outscraper-php) で歓迎されます。