### Manual Installation of Outscraper PHP Library Source: https://github.com/outscraper/outscraper-php/blob/main/README.md Includes the init.php file for manual installation of the Outscraper PHP library, used when not employing Composer. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Install Outscraper PHP SDK via Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Company Insights.md Installs the Outscraper PHP library using Composer, a dependency manager for PHP. This is the recommended installation method. ```Bash composer require outscraper/outscraper ``` -------------------------------- ### Manual Installation of Outscraper PHP SDK Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Company Insights.md Includes the init.php file for manual installation of the Outscraper PHP SDK, used when not employing Composer. Ensure the path to the init.php file is correct. ```PHP require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Install Outscraper PHP Package Source: https://github.com/outscraper/outscraper-php/blob/main/examples/SimilarWeb Scraper.md Installs the Outscraper PHP library using Composer, the standard package manager for PHP. This makes the library available for use in your project via autoloading. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP using Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Scraper.md Installs the Outscraper PHP client library using Composer, the dependency manager for PHP. This is the recommended method for integrating the library into your project. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP Package Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Search Scraper.md Installs the Outscraper PHP library using Composer, a dependency manager for PHP. This makes the library available for use in your project. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP using Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Run Async Requests.md This snippet shows the Composer command to install the Outscraper PHP library. It's the recommended method for managing dependencies in PHP projects. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP Library via Composer Source: https://github.com/outscraper/outscraper-php/blob/main/README.md Installs the Outscraper PHP library using Composer. This is the recommended method for managing dependencies in PHP projects. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP Package Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Email Addresses Finder.md Installs the Outscraper PHP library using Composer, the standard package manager for PHP. This command adds the necessary dependencies to your project. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Include Outscraper Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/SimilarWeb Scraper.md Includes the init.php file from the Outscraper PHP library for manual installation. This method is used when not utilizing Composer for dependency management. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Install Outscraper PHP Package via Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Reviews Scraper.md Installs the Outscraper PHP library using Composer, a dependency manager for PHP. This is the recommended method for integrating the library into your project. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP via Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Company Website Finder.md Installs the Outscraper PHP library using Composer, the standard dependency manager for PHP. This command adds the library to your project's dependencies. ```Bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP Library via Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Tripadvisor Reviews Scraper.md Installs the Outscraper PHP library using Composer, the standard dependency manager for PHP. This command adds the library to your project's dependencies. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP using Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Photos Scraper.md Installs the Outscraper PHP library using Composer, a dependency manager for PHP. This is the recommended method for integrating the library into your project. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP Library via Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Directions.md Installs the Outscraper PHP library using Composer, the standard dependency manager for PHP. This command adds the library to your project's dependencies. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP using Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Phones Validator.md Installs the Outscraper PHP library using Composer, a dependency manager for PHP. This is the recommended method for integrating the library into your project. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP Package via Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Emails And Contacts.md Installs the Outscraper PHP library using Composer, a dependency manager for PHP. This is the recommended method for integrating the library into your project. ```Bash composer require outscraper/outscraper ``` -------------------------------- ### Include Outscraper PHP Library Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Directions.md Includes the `init.php` file from the Outscraper PHP library for manual installation. This method is an alternative to using Composer for dependency management. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Install Outscraper PHP Client via Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps.md Installs the Outscraper PHP library using Composer, a dependency manager for PHP. This is the recommended method for integrating the library into your project. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP via Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Reviews.md Installs the Outscraper PHP library using Composer, the standard package manager for PHP. This command adds the library as a dependency to your project. ```Bash composer require outscraper/outscraper ``` -------------------------------- ### Install Outscraper PHP Library via Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Youtube Comments Scraper.md Installs the Outscraper PHP library using Composer, a dependency manager for PHP. This is the recommended method for managing project dependencies. ```Bash composer require outscraper/outscraper ``` -------------------------------- ### Include Outscraper PHP Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Reviews.md Includes the `init.php` file for manual installation of the Outscraper PHP library. This is an alternative to using Composer, suitable if you prefer not to use a package manager. ```PHP require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Install Outscraper PHP using Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google SERP.md Installs the Outscraper PHP library using Composer, the standard dependency manager for PHP. This command adds the library to your project's dependencies. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Directions.md Includes the Composer autoloader file in your PHP script to enable the use of installed libraries. This is essential for using the Outscraper PHP bindings after installation. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Outscraper Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Search Scraper.md Includes the `init.php` file from the Outscraper PHP library when not using Composer for installation. This makes the library's functionality available. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Install Outscraper PHP Library via Composer Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Yellow Pages Search Scraper.md Installs the Outscraper PHP library using Composer, a dependency manager for PHP. This is the recommended method for managing project dependencies. ```bash composer require outscraper/outscraper ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Run Async Requests.md This PHP code demonstrates how to include the Composer autoloader, which is necessary to use the installed Outscraper PHP library in your project. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Emails And Contacts.md Includes the Composer autoloader file in your PHP script to enable the use of the installed Outscraper library classes. This is necessary after installing via Composer. ```PHP require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Outscraper Autoloader Source: https://github.com/outscraper/outscraper-php/blob/main/examples/SimilarWeb Scraper.md Includes the Composer autoloader file to make the Outscraper library classes available in your PHP script. This is necessary after installing via Composer. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Outscraper PHP Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Run Async Requests.md This PHP code shows how to include the Outscraper PHP library manually if you are not using Composer. It requires including the 'init.php' file from the library's installation path. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Include Outscraper PHP Library Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Youtube Comments Scraper.md Includes the 'init.php' file from the Outscraper PHP library for manual installation, bypassing Composer. Ensure the path to the file is correct. ```PHP require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Reviews Scraper.md Includes the Composer autoloader file in your PHP script to make the Outscraper library classes available. This is necessary after installing via Composer. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Company Insights.md Includes the Composer autoloader file in your PHP project to make the Outscraper SDK classes available. This is necessary after installing via Composer. ```PHP require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Scraper.md Includes the Composer autoloader file in your PHP script to make the Outscraper library classes available. This is necessary after installing via Composer. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Tripadvisor Reviews Scraper.md Includes the Composer autoloader file in your PHP script to make the Outscraper library classes available. This is essential for using the library after installation via Composer. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Youtube Comments Scraper.md Includes the Composer autoloader file in your PHP project to enable the use of installed libraries, including the Outscraper package. ```PHP require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google SERP.md Includes the Composer autoloader file in your PHP script to make the installed Outscraper library classes available for use. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Scrape Multiple Places Reviews Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Reviews.md Scrapes reviews for multiple places specified by their IDs. This example demonstrates setting limits for both the number of reviews per place and the number of places per query. ```PHP $results = $client->google_maps_reviews( ["ChIJN5X_gWdZwokRck9rk2guJ1M", "ChIJxWLy8DlawokR1jvfXUPSTUE"], reviews_limit: 20, # limit of reviews per each place limit: 1, # limit of palces per each query ); foreach ($results as &$place) { print($place['name']); foreach ($place['reviews_data'] as &$review) { print($review['review_text']); } }; ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps.md Includes the Composer autoloader file to make the Outscraper library classes available in your PHP script. This is necessary after installing via Composer. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Yellow Pages Search Scraper.md Includes the Composer autoloader file in your PHP project to enable the use of installed libraries, including the Outscraper PHP bindings. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Scrape Google Maps Reviews by Search Query Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Reviews.md Retrieves Google Maps reviews for places found by a given search query. This example shows how to set a limit for the number of places to scrape and the total number of reviews. ```PHP $results = $client->google_maps_reviews(['Memphis Seoul brooklyn usa'], reviews_limit: 20, limit: 500, language: 'en'); ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Phones Validator.md Includes the Composer autoloader file in your PHP script to make the Outscraper library classes available for use. This is necessary after installing via Composer. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Scrape Google Maps Reviews by Place ID Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Reviews.md Fetches Google Maps reviews for a specific place identified by its ID. This example demonstrates how to retrieve a limited number of reviews and specify the language. ```PHP $results = $client->google_maps_reviews(['ChIJrc9T9fpYwokRdvjYRHT8nI4'], reviews_limit: 20, language: 'en'); ``` -------------------------------- ### Get Google Maps Photos using Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Photos Scraper.md Fetches Google Maps photos for a given place name using the initialized Outscraper client. The result is stored in the $results variable. ```php $results = $client->get_google_maps_photos(['The NoMad Restaurant, NY, USA']); ``` -------------------------------- ### Get Google Maps Place Data by Place ID Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps.md Retrieves detailed information for a specific Google Maps place using its unique Place ID. This method is useful for fetching data of a known location. ```php $results = $client.google_maps_search(['ChIJrc9T9fpYwokRdvjYRHT8nI4'], language: 'en'); ``` -------------------------------- ### Get Google Maps Directions using Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Directions.md Fetches directions between specified origins and destinations using the Google Maps Directions API via the Outscraper PHP client. The `async_request` parameter controls whether the request is made asynchronously. ```php $origins = ['29.696596,76.994928', '29.696596,76.994928']; $destinations = ['30.715966244353,76.8053887016268', '30.723065,76.770169']; $results = $client->google_maps_directions( $origins, $destinations, async_request: false ); ``` -------------------------------- ### Initialize Outscraper Client with API Key Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Reviews Scraper.md Initializes the Outscraper client using your secret API key. This client object is then used to make requests to the Outscraper API. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Include Outscraper PHP Library Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Reviews Scraper.md Includes the main initialization file for the Outscraper PHP library when not using Composer. This allows manual integration of the library. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Initialize Outscraper Client Source: https://github.com/outscraper/outscraper-php/blob/main/examples/SimilarWeb Scraper.md Initializes the Outscraper client with a provided secret API key. This client instance is used to interact with the Outscraper API for various scraping tasks. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Fetch Trustpilot Reviews using Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Reviews Scraper.md Fetches reviews from a Trustpilot business page using the initialized Outscraper client. It takes an array of Trustpilot URLs as input. ```php $results = $client->trustpilot_reviews(['https://www.trustpilot.com/review/outscraper.com']); ``` -------------------------------- ### Include Outscraper PHP Library Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Tripadvisor Reviews Scraper.md Includes the `init.php` file from the Outscraper PHP library when not using Composer. This allows manual integration of the library by directly including its main initialization script. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Initialize Outscraper PHP Client Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Run Async Requests.md This PHP code initializes the Outscraper client with a secret API key. The API key is essential for authenticating requests to the Outscraper API. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper Client with API Key Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Tripadvisor Reviews Scraper.md Initializes the Outscraper client using a secret API key. This client object is then used to interact with the Outscraper API for various scraping tasks. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Include Outscraper PHP Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Scraper.md Includes the main initialization file for the Outscraper PHP library when not using Composer. This method requires manual download of the library. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Initialize Outscraper Client Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Company Website Finder.md Initializes the Outscraper client with your secret API key. This client object is used to interact with the Outscraper API. ```PHP $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper Client Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Search Scraper.md Initializes the Outscraper client with your secret API key. This client object is used to interact with the Outscraper API. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper Client in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Scraper.md Initializes the Outscraper client with your secret API key. This client object is then used to make requests to the Outscraper API. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper PHP Client Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Company Insights.md Initializes the Outscraper client with your secret API key. This client object is used to interact with the Outscraper API. ```PHP $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper Client Source: https://github.com/outscraper/outscraper-php/blob/main/README.md Initializes the Outscraper client with a secret API key. This client object is used to interact with the Outscraper API. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Search Trustpilot Data with Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Scraper.md Searches for data from Trustpilot businesses using the initialized Outscraper client. It takes a list of domains as input and returns the scraped results. ```php $results = $client->trustpilot(['outscraper.com']); ``` -------------------------------- ### Include Outscraper PHP Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Photos Scraper.md Includes the 'init.php' file to use the Outscraper PHP bindings when not using Composer. This method requires manual download of the library. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Fetch Company Insights using Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Company Insights.md Fetches company insights, such as revenue and size, for a given list of company domains. This function requires an initialized Outscraper client. ```PHP $results = $client->company_insights(['outscraper.com']); ``` -------------------------------- ### Include Outscraper Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Company Website Finder.md Includes the Outscraper PHP library manually by requiring the init.php file. This method is an alternative if Composer is not used. ```PHP require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Search Trustpilot Companies Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Search Scraper.md Performs a search on Trustpilot for companies related to the provided keywords using the initialized Outscraper client. The results are returned in an array. ```php $results = $client->trustpilot_search(['real estate']); ``` -------------------------------- ### Initialize Outscraper Client with API Key Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Youtube Comments Scraper.md Initializes the Outscraper client using a secret API key. This client object is then used to make requests to the Outscraper API. ```PHP $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper Client Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Reviews.md Initializes the Outscraper client with your secret API key. This client object is used to interact with the Outscraper API for scraping tasks. ```PHP $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper Client Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Photos Scraper.md Initializes the Outscraper client with your secret API key. This client object is used to interact with the Outscraper API. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper Client Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Email Addresses Finder.md Initializes the Outscraper client with your secret API key. This client object is used to interact with the Outscraper API for various services. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper Client with API Key Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps.md Initializes the Outscraper client by creating a new instance with your secret API key. This client object is used to interact with the Outscraper API. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper PHP Client Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Emails And Contacts.md Initializes the Outscraper client with a secret API key. The API key is required to authenticate requests to the Outscraper API. ```PHP $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Include Outscraper PHP Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Emails And Contacts.md Includes the 'init.php' file from the Outscraper PHP library when not using Composer. This allows manual integration of the library by specifying the correct path to the downloaded files. ```PHP require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Initialize Outscraper PHP Client Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Yellow Pages Search Scraper.md Initializes the Outscraper PHP client with a secret API key. This client object is used to interact with the Outscraper API for various scraping tasks. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper Client with API Key Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Directions.md Initializes the Outscraper client with a secret API key. This client object is used to interact with the Outscraper API for various services, including Google Maps directions. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Initialize Outscraper PHP Client Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google SERP.md Initializes the Outscraper client with your secret API key. This client object is used to interact with the Outscraper API for various scraping tasks. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Perform Google Search using Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google SERP.md Executes a Google search for a given query using the initialized Outscraper client. It allows specifying the search query, language, and region. ```php $results = $client->google_search(['buy iphone 13 TX'], language: 'en', region: 'us'); ``` -------------------------------- ### Include Outscraper Autoloader Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Trustpilot Search Scraper.md Includes the Composer autoloader file in your PHP script to enable the use of the Outscraper library's classes and functions. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Outscraper Autoloader Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Company Website Finder.md Includes the Composer autoloader to make the Outscraper library classes available in your PHP project. This is a standard practice when using Composer-managed dependencies. ```PHP require_once('vendor/autoload.php'); ``` -------------------------------- ### Scrape SimilarWeb Data Source: https://github.com/outscraper/outscraper-php/blob/main/examples/SimilarWeb Scraper.md Fetches website analytics data from SimilarWeb for the specified domain using the initialized Outscraper client. The result contains traffic, rankings, and audience insights. ```php $results = $client->similarweb(['apple.com']); ``` -------------------------------- ### Scrape Tripadvisor Reviews using Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Tripadvisor Reviews Scraper.md Fetches reviews for a Tripadvisor business by providing a list of business URLs to the `tripadvisor_reviews` method of the Outscraper client. This function returns the scraped review data. ```php $results = $client->tripadvisor_reviews(['https://www.tripadvisor.com/Restaurant_Review-g187147-d12947099-Reviews-Mayfair_Garden-Paris_Ile_de_France.html']); ``` -------------------------------- ### Include Outscraper PHP Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google SERP.md Includes the `init.php` file from the Outscraper PHP library when not using Composer. This allows manual integration of the library into your project. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Include Composer Autoloader Source: https://github.com/outscraper/outscraper-php/blob/main/README.md Includes the Composer autoloader to make the Outscraper library classes available in your PHP project. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Outscraper PHP Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Phones Validator.md Includes the init.php file to use the Outscraper PHP bindings when not using Composer. This method requires manual download of the library. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Include Composer Autoloader in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Photos Scraper.md Includes the Composer autoloader file in your PHP script to make the Outscraper library classes available for use. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Send Async Google Maps Search Requests in PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Run Async Requests.md This PHP code snippet demonstrates how to send multiple asynchronous Google Maps search requests using the Outscraper PHP client. It collects request IDs and then retrieves the results. ```php $results = array(); $running_request_ids = array(); $place_ids = array( 'ChIJNw4_-cWXyFYRF_4GTtujVsw', 'ChIJ39fGAcGXyFYRNdHIXy-W5BA', 'ChIJVVVl-cWXyFYRQYBCEkX0W5Y', 'ChIJScUP1R6XyFYR0sY1UwNzq-c', 'ChIJmeiNBMeXyFYRzQrnMMDV8Jc', 'ChIJifOTBMeXyFYRmu3EGp_QBuY', 'ChIJ1fwt-cWXyFYR2cjoDAGs9UI', 'ChIJ5zQrTzSXyFYRuiY31iE7M1s', 'ChIJQSyf4huXyFYRpP9W4rtBelA', 'ChIJRWK5W2-byFYRiaF9vVgzZA4' ); foreach ($place_ids as &$place_id) { $response = $client->google_maps_search([$place_id], language: 'en', region: 'us', async_request: TRUE); array_push($running_request_ids, $response['id']); } $attempts = 5; # retry 5 times while ($attempts && !empty($running_request_ids)) { # stop when no more attempts are left or when no more running request ids $attempts = $attempts - 1; sleep(60); foreach ($running_request_ids as &$request_id) { $result = $client->get_request_archive($request_id); if ($result['status'] != 'Success') { array_push($results, $result['data']); if (($key = array_search($del_val, $running_request_ids)) !== false) { unset($running_request_ids[$key]); } } } } print_r($results); ``` -------------------------------- ### Include Outscraper PHP Library Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps.md Includes the Outscraper PHP library manually by requiring the init.php file. This method is an alternative if you are not using Composer. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Include Outscraper PHP Library Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Yellow Pages Search Scraper.md Includes the Outscraper PHP library manually by requiring the 'init.php' file. This method is used when not employing Composer for dependency management. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Find Company Website with Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Company Website Finder.md Uses the Outscraper client to find the website for a given business name. This function takes an array of business names and returns their corresponding websites. ```PHP $results = $client->company_website_finder(['Apple Inc']); ``` -------------------------------- ### Scrape Emails and Contacts from Domains Source: https://github.com/outscraper/outscraper-php/blob/main/README.md Scrapes email addresses and contact information from a list of domains. The results are then printed. ```php $results = $client->emails_and_contacts([ 'outscraper.com' ]); print_r($results); ``` -------------------------------- ### Include Outscraper PHP Manually Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Email Addresses Finder.md Includes the Outscraper PHP library manually by specifying the path to the init.php file. This method is used when not utilizing Composer for dependency management. ```php require_once('/path/to/outscraper-php/init.php'); ``` -------------------------------- ### Scrape Google Maps Reviews Source: https://github.com/outscraper/outscraper-php/blob/main/README.md Scrapes Google Maps reviews for a specific location URL, with options to limit the number of reviews and sort them by date. The results are then printed. ```php $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); ``` -------------------------------- ### Include Composer Autoloader Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Reviews.md Includes the Composer autoloader file to make the Outscraper library classes available in your PHP project. This is essential for using the library's functionalities. ```PHP require_once('vendor/autoload.php'); ``` -------------------------------- ### Include Autoloader in PHP Project Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Email Addresses Finder.md Includes the Composer autoloader file in your PHP project to make the Outscraper library classes available for use. This is a standard practice when using Composer dependencies. ```php require_once('vendor/autoload.php'); ``` -------------------------------- ### Scrape Google Maps Results by Query Source: https://github.com/outscraper/outscraper-php/blob/main/README.md Scrapes Google Maps results for a given query, specifying the search term, language, and country. The results are then printed. ```php $results = $client->google_maps_search(['asian restaurants Berlin, Germany'], 'en', 'DE'); print_r($results); ``` -------------------------------- ### Initialize Outscraper Client with API Key Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Phones Validator.md Initializes the Outscraper client with your secret API key. This client object is used to interact with the Outscraper API for various services. ```php $client = new OutscraperClient("SECRET_API_KEY"); ``` -------------------------------- ### Scrape YouTube Comments using Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Youtube Comments Scraper.md Fetches comments from a specified YouTube video URL using the initialized Outscraper client. The result contains information about the comments. ```PHP $results = $client->youtube_comments(['https://www.youtube.com/watch?v=ph5pHgklaZ0']); ``` -------------------------------- ### Scrape Contacts Using Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Emails And Contacts.md Searches for contacts, including email addresses, from a given website using the initialized Outscraper client. This function takes an array of domains as input. ```PHP $results = $client->emails_and_contacts(['outscraper.com']); ``` -------------------------------- ### Perform Yellow Pages Search with Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Yellow Pages Search Scraper.md Executes a search query on Yellow Pages using the initialized Outscraper PHP client. The search term 'restaurants' is passed as an argument to the yellowpages_search method. ```php $results = $client->yellowpages_search(['restaurants']); ``` -------------------------------- ### Scrape Google Maps Places by Multiple Location Queries Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps.md Scrapes Google Maps places by providing an array of location queries. This allows fetching data for multiple search terms simultaneously, with a specified limit and region. ```php $results = $client->google_maps_search( ['restaurants brooklyn usa', 'bars brooklyn usa'], limit: 50, # limit of palces per each query language: 'en', region: 'US', ); foreach ($results as &$query_places) { foreach ($query_places as &$place) { print($place['query']); print($place['name']); print($place['phone']); print($place['site']); } }; ``` -------------------------------- ### Scrape New Google Maps Reviews by Timestamp Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Reviews.md Fetches only new Google Maps reviews posted within the last 24 hours. It uses a timestamp cutoff to filter reviews, along with sorting by newest. ```PHP $yesterday_timestamp = 1657980986; $results = $client->google_maps_reviews( ['ChIJrc9T9fpYwokRdvjYRHT8nI4'], sort: 'newest', cutoff: $yesterday_timestamp, reviews_limit: 100, language: 'en'); ``` -------------------------------- ### Search Google Maps Businesses by Location Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps.md Searches for businesses in a specified location (e.g., 'restaurants brooklyn usa') using the Outscraper API. It allows setting a limit for the number of results and specifying the language and region. ```php $results = $client->google_maps_search(['restaurants brooklyn usa'], limit: 20, language: 'en', region: 'us'); ``` -------------------------------- ### Scrape Google Maps Places by Multiple Place IDs Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps.md Scrapes Google Maps places by providing an array of Place IDs. This method is efficient for retrieving data for a predefined list of locations, with an option to limit the results. ```php $results = $client->google_maps_search( ["ChIJ8ccnM7dbwokRy-pTMsdgvS4", "ChIJN5X_gWdZwokRck9rk2guJ1M", "ChIJxWLy8DlawokR1jvfXUPSTUE"], limit: 1, # limit of palces per each query ); foreach ($results as &$query_places) { foreach ($query_places as &$place) { print($place['query']); print($place['place_id']); } }; ``` -------------------------------- ### Scrape Only New Reviews by Timestamp Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Google Maps Reviews.md Retrieves only new reviews posted since a specified timestamp. This is useful for incremental updates, allowing you to fetch reviews added after your last data collection. ```PHP $results = $client->google_maps_reviews( ["ChIJN5X_gWdZwokRck9rk2guJ1M", "ChIJxWLy8DlawokR1jvfXUPSTUE"], reviews_limit: 1000, limit: 1, sort: 'newest', cutoff: 1654596109, # the maximum timestamp value for reviews (oldest review you want to extract). Can be used to scrape only the new reviews since your latest update ); foreach ($results as &$place) { print($place['name']); print_r($place['reviews_data']); }; ``` -------------------------------- ### Validate Email Addresses with Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Email Addresses Finder.md Validates a list of email addresses using the Outscraper PHP client. This function checks the deliverability of the provided email addresses. ```php $results = $client->validate_emails(['support@outscraper.com']); ``` -------------------------------- ### Enrich Phone Number Data using Outscraper PHP Source: https://github.com/outscraper/outscraper-php/blob/main/examples/Phones Validator.md Retrieves carrier data and validates a phone number using the Outscraper API. This function takes an array of phone numbers as input and returns detailed information. ```php $results = $client->phones_enricher(['12812368208']); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.