Download the PHP package michaeluno/php-simple-web-scraper without Composer

On this page you can find all versions of the php package michaeluno/php-simple-web-scraper. 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 php-simple-web-scraper

PHP Simple Web Scraper

A PHP application for Heroku, which can dump web site outputs including JavaScript generated contents.

Demo

Visit here. If the server is sleeping, it takes several seconds to wake up.

Usage

Basic Usage

Perform an HTTP request with the url query parameter and encoded URL as a value.

Example

Parameters

output

Determines the output type, which includes html, json, screenshot.

html (default)

HTML source code of the target web site. JavaScript generated contents are also retrieved and dumped.

json

output=json

HTTP response data as JSON. Useful for cross domain communications with JSONP.

Example
screenshot

output=screenshot

A jpeg image of the site snapshot.

Example

file-type

When screenshot is given for the output parameter, the output file type can be set with the file-type parameter. Default: jpg.

It accepts the following values: pdf, png, jpg, jpeg, bmp, ppm.

width

When screenshot is given for the output parameter, width sets the screenshot image width.

height

When screenshot is given for the output parameter, height sets the screenshot image height. Leave it unset to get full height. The default minimum height is 720 pixels.

Example

user-agent

Sets a custom user agent. By default, the client's user agent accessing the app will be used. This can be changed by specifying the value with this parameter.

If random is given, the user-agent will be randomly assigned.

Example

To set a user agent, Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100102 Firefox/57.0,

load-images

Decides whether to load images. By default, this is disabled for the html and json output types. Enabled for the screenshot output type.

Accepts a boolean value true, false, or 1, 0.

Example

output-encoding

Sets the encoding used for the output. Default: utf8

cache-lifespan

All requests are cached for 20 minutes by default. This detemines how long the cache should be retained. If you do not want a cached result or want to renew the cache, pass 0. Default: 1200.

headers

Sets a custom HTTP headers. Accepts the value as an array.

Example

To set DNT value,

method

HTTP request method. Default: GET. Accepts the followings.

When using POST, give sending post data with the data request key. The program checks $_REQUEST[ 'data' ] to send POST data.

Example

Run as Heroku Application

This is a Heroku application and meant to be deployed to a Heroku application instance.

Requirements

Steps to Deploy

a) Quick Deploy

You may simply use the following button to deploy this application:

Deploy

b) Manual Deploy

  1. Clone this repository to your local machine. Create a directory and from there, in a console window, type the following.

This will download the repository files.

  1. Change the working directory to the cloned one.

  2. Login to Heroku from Heroku CLI.

  3. Create a new Heroku app.

This gives somehing like this with a random app name. glacial-basin-46381 is the app name in the below example.

  1. Type the following. Replace {heroku-app-name} with your app name given in the above step.

  2. Upload the files to Heroku.

  3. Open the app in your browser.

All versions of php-simple-web-scraper with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.20
ext-mbstring Version *
ext-json Version *
jakoch/phantomjs-installer Version 3.0.0 as 2.1.1-p08
jonnyw/php-phantomjs Version 4.6.1
michaeluno/php-classmap-generator Version 1.*
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 michaeluno/php-simple-web-scraper contains the following files

Loading the files please wait ....