Skip to content

Instantly share code, notes, and snippets.

@sehmbimanvir
Last active May 17, 2020 12:50
Show Gist options
  • Save sehmbimanvir/bcc21099faf11b81a4ca08815761e423 to your computer and use it in GitHub Desktop.
Save sehmbimanvir/bcc21099faf11b81a4ca08815761e423 to your computer and use it in GitHub Desktop.
PHP Web Scrapping - Fetch Data
<?php
require 'vendor/autoload.php';
use Curl\Curl;
use Symfony\Component\DomCrawler\Crawler;
$curl = new Curl();
$curl->get('https://github.com/trending');
$html = $curl->response;
$crawler = new Crawler($html);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment