A PHP package for searching courses on Alura website.
This package provides a functionality to search for courses on Alura website. It uses the GuzzleHttp and Symfony Dom Crawler libraries to make HTTP requests and parse the HTML of the page.
- PHP >= 7.2
- Composer
To install the package, use Composer. Run the following command in the root directory of your project:
composer require aeusteixeira/buscador-cursos
require 'vendor/autoload.php';
use Aeusteixeira\BuscadorDeCursos\Buscador;
use GuzzleHttp\Client;
use Symfony\Component\DomCrawler\Crawler;
$client = new Client(['base_uri' => 'https://www.alura.com.br/']);
$crawler = new Crawler();
$buscador = new Buscador($client, $crawler);
$cursos = $buscador->buscar('/cursos-online-programacao/php');
foreach ($cursos as $curso) {
echo $curso . PHP_EOL;
}
Contributions are welcome! Feel free to submit pull requests or report issues.
This project is licensed under the terms of the MIT license. See the LICENSE file for more information.
Please make sure to customize the sections of the README.md with the relevant information for your project.