Webscraping

Web scraping is the process of extracting data from websites. It involves fetching web pages, parsing HTML (or other markup languages), and then extracting the desired information. Web scraping can be done manually by a person or automatically using software tools called web scrapers or web crawling bots.

<?php

// fetching the web page
$html = file_get_contents('https://www.php.net/');

// retrieving PHP current versions
preg_match_all('/downloads.php#v(\d+\.\d+\.\d+)\b/', $html, $r);

print_r(array_unique($r[1]));

?>

Documentation

See also Web Scraping in PHP - The Complete Guide

Related packages : symfony/panther, roach-php/core, jaeger/querylist