Download the PHP package ostapovich/google-reviews without Composer
On this page you can find all versions of the php package ostapovich/google-reviews. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ostapovich/google-reviews
More information about ostapovich/google-reviews
Files in ostapovich/google-reviews
Package google-reviews
Short Description A library for fetching Google reviews
License MIT
Informations about the package google-reviews
Google Reviews Library
This library fetches Google reviews for a specific place using PHP.
Installation
Install via Composer:
Usage
For this packege your needs 2 urls. You can take them according to the following instructions, it is much easier than Google Business
Here's a basic example:
Methods
-
getReviewsAll(string $url,int $page = 0): array|\Exception
- Fetches all reviews from the provided URL.
-
getCrawlerObj(string $url): Crawler|\Exception
- Creates a Crawler object for the provided URL.
-
getNextReviewsPage(string $nextPageUrl, int $page = 0): string|\Exception
- Fetches the HTML content of the next page of reviews.
-
getNextPageToken(Crawler $crawler): string|null|\Exception
- Extracts the
data-next-page-token
from the HTML content.
- Extracts the
-
getRating(Crawler $crawler)
- Extracts the overall rating from the HTML content.
-
getReviews(Crawler $crawler): array|\Exception
- Extracts the reviews from the HTML content.
-
getReviewsIds(Crawler $crawler): array|\Exception
- Extracts the review IDs from the HTML content.
-
getReviewsCount(Crawler $crawler): int|null|\Exception
- Extracts the total number of reviews from the HTML content.
-
getReviewsTexts(Crawler $crawler): array|\Exception
- Extracts the review texts from the HTML content.
-
getReviewsReply(Crawler $crawler): array|\Exception
- Extracts the review replies from the HTML content.
-
getReviewsNames(Crawler $crawler): array|\Exception
- Extracts the reviewer names from the HTML content.
-
getReviewsRatings(Crawler $crawler): array|\Exception
- Extracts the review ratings from the HTML content.
getProfilesImg(Crawler $crawler): array
- Extracts the profile Img's from the HTML content.
All versions of google-reviews with dependencies
php Version ^8.0
guzzlehttp/guzzle Version ^7.4
nesbot/carbon Version ^3.0