2017 © Pedro Peláez
 

library sorcerer

An easy-to-use PHP class for scraping webpages' source code.

image

gavinggordon/sorcerer

An easy-to-use PHP class for scraping webpages' source code.

  • Wednesday, February 1, 2017
  • by gavinggordon
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Sorcerer

Packagist Version Github Release Usage License, (*1)

Description

An easy-to-use PHP class for scraping webpages' source code., (*2)

Usage

Installation

    $ composer require gavinggordon/sorcerer

Examples

Insantiation

``` php include( 'vendor/autoload.php' );, (*3)

use GGG\Http\Data\Collection\Sorcerer as Sorcerer;

$scraper = new Sorcerer();

#### Configuration ``` php $url = 'http://www.testurl.com/index.php'; $regexes = [ '/\<a\s?[^\>]+?\>(.+)\<\/a\>/i', '/\<img\s?([^\>]+?)[\s\/]*?\>/i' ]; $savefile = __DIR__ . './testurl-scrapedata.txt'; $scraper->configure( $url, $regexes, $savefile );

Run

If no filepath was set for "$savefile",..., (*4)

    $data = $scraper->scrape();

    print_r( $data );

...the scraped data will be returned., (*5)

If a filepath was set for "$savefile",..., (*6)

    $scraper->scrape();

...the scraped data will be saved to the file which you specified., (*7)

Issues

If you have any issues at all, please post your findings in the issues page at https://github.com/gavinggordon/sorcerer/issues., (*8)

License

This package utilizes the MIT License., (*9)

The Versions

01/02 2017

dev-master

9999999-dev http://sorcerer.gavingordon.com

An easy-to-use PHP class for scraping webpages' source code.

  Sources   Download

MIT

The Development Requires

php collection http scraping website scraper webpage web crawling crawling web crawler inspection v1.0.0 web scraping source code data collecting html code investigation

14/01 2017

1.0.0

1.0.0.0 http://sorcerer.gavingordon.com

An easy-to-use PHP class for scraping webpages' source code.

  Sources   Download

MIT

The Development Requires

php collection http scraping website scraper webpage web crawling crawling web crawler inspection v1.0.0 web scraping source code data collecting html code investigation