scrapinglink / php-scraping-link
Package to use Scraping Link API from PHP
1.0.1
2021-05-25 10:13 UTC
Requires
- php: ^7.4|^8.0
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.3
README
A PHP Package for Web Scraping with Scraping.link. Scraping Link allows you to scrape any website and solve typical blocking complications.
Installation
You can install the package via composer:
composer require scrapinglink/php-scraping-link
Usage
Initialize using your API token
use Scrapinglink\PhpScrapingLink\ScrapingLink; $scrapingLink = new ScrapingLink('LZIK69Bfg2km3VDG1oyHnwo1RMIymIYgChuocgypoqyQstGeonVpS6iNBMTz');
Scrape URL and get response
$response = $scrapingLink->scrape('https://google.com'); echo "Status code: " . $response->status(); echo "Body: " . $response->body();
Scrape URL and get response with JS rendering
$response = $scrapingLink->scrape('https://google.com', true); echo "Status code: " . $response->status(); echo "Body: " . $response->body();
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.