Last active
May 17, 2020 12:50
-
-
Save sehmbimanvir/bcc21099faf11b81a4ca08815761e423 to your computer and use it in GitHub Desktop.
PHP Web Scrapping - Fetch Data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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