Download the PHP package evgeek/scraperapi-sdk without Composer

On this page you can find all versions of the php package evgeek/scraperapi-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package scraperapi-sdk

PHP SDK for ScraperAPI

Simplify your web scrapping tasks with ScraperAPI. This SDK works with Guzzle client, providing asynchronous multithreading requests and convenient PSR-7 response.

Installation

Requires PHP version 7.2 or higher

Basic usage

Setup client

The client is configured through the constructor parameters:

Configure default SDK Client parameters

API parameters

Configuring default API functionality according to ScraperAPI documentation . The default settings apply to all requests, unless they are overridden at the request level. You can set the default options only from constructor (SDK client is immutable), using the second parameter:

Headers

You can add default headers with the third parameter of the constructor. Don't forget to enable to allow your headers to be used!

Requests

SDK supports , and HTTP methods. Standard parameters of each request methods:

  1. (required) - url of scrapped resource.
  2. (default ) - to set the API settings for the request. They will override the defaults from the SDK Client (only those that overlap).
  3. (default ) - to set headers for the request. Just like , they will override the defaults from the SDK Client (only those that overlap).

Synchronous

GET

Pretty simple:

POST/PUT

A bit more complicated:

You can use three types of payload:

There are also short forms of methods for different types of payloads:

By the way, it is convenient to pass the GraphQL payload through :

Asynchronous

Everything is similar to synchronous, but the work is going not through requests, but through promises:

Your ScraperAPI Account Information

You can get your ScraperAPI account information using the accountInfo() method:


All versions of scraperapi-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
psr/log Version ^1.1
guzzlehttp/guzzle Version 7.4.*
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package evgeek/scraperapi-sdk contains the following files

Loading the files please wait ....