|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not enough user ratings||Total: 133 ||All time: 9,039 This week: 310|
This class can scrape Web page content using regular expressions,
It takes a given page URL and retrieves its contents.
The class can use a given list of regular expressions and extract the page content matches to a given file.
An easy-to-use PHP class for scraping webpages' source code.
$ composer require gavinggordon/sorcerer
include( 'vendor/autoload.php' );
use GGG\Http\Data\Collection\Sorcerer as Sorcerer;
$scraper = new Sorcerer();
$url = 'http://www.testurl.com/index.php';
$regexes = [
$savefile = __DIR__ . './testurl-scrapedata.txt';
$scraper->configure( $url, $regexes, $savefile );
If no filepath was set for "$savefile",...
$data = $scraper->scrape();
print_r( $data );
...the scraped data will be returned.
If a filepath was set for "$savefile",...
...the scraped data will be saved to
the file which you specified.
If you have any issues at all, please post your findings in the issues page at https://github.com/gavinggordon/sorcerer/issues.
This package utilizes the MIT License.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.