scrapinglink/php-scraping-link

Package to use Scraping Link API from PHP

1.0.1 2021-05-25 10:13 UTC

This package is auto-updated.

Last update: 2025-04-25 19:00:41 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

scraping.link web scraping API

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.