Aug 12, 2018
78 Views
0 0

Local Google Results Scraper – PHP Class

Written by

LIVE PREVIEWBUY FOR $9

PHP class to scrape local search results from Google. Customize location, language, domain, and device type.

Please note that this is not an application. It is only code and you must know PHP in order to use it.

features

  • Scrape local search results from over 92,000 places worldwide.
  • Disables and overrides Google's automatic position detection.
  • Scratch unlimited pages.
  • Set the language for search results.
  • Switch easily between desktop, tablet, or mobile.
  • Use any Google domain (google.com, google.nl, etc.)
  • Proxy support – with optional user / pass authentication
  • Quick and easy parsing – Do not use a DOM.
  • Component-ready (PSR-4) version included.

API documentation

Please look at Live Preview to view full API documentation and multiple code examples. Or you can Search the available places.

Sample Code

setLocation ("new york");
$ google-> setQuery ("nearby restaurants");
$ Google-> setDevice ("mobile"); // optional
$ google-> setLanguage (new language ("es")); // optional
$ google-> setProxy ("123.211.1.13:8080", "user: pass"); // optional

$ page1 = $ google-> next ();
$ page2 = $ google-> next ();

mens ($ result = $ page1-> fetch_array ()) {
$ title = $ result["title"];
$ description = $ results["description"];
$ site = $ result["site"];
$ domain = $ result["domain"];

echo $ title. "-";
echo $ domain. "
"; } ?>

Requirements

  • PHP 5.4 +
  • CURL

Changelog



Version 1.0.2 (August 1, 2016)
- Added new "url" property to search results to get the absolute URL for each result

Version 1.01
- New technical documentation.
- Fixed some domain names that do not correctly analyze.
- Added new local and language classes.
- Updated component (PSR-4) code to follow specifications.

Version 1.0
- First release

Source

Article Tags:
Article Categories:
Php Scripts
ThemeForest best selling themes

Jaeho Park completed a Master in Fine Arts at the Hongik University in 1999, followed by a Master in Photographic Studies at the University of Westminster in 2012. After working for many years as a university professor, designer and curator in South Korea.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.