Skip to content

Commit

Permalink
Update scraper.php
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdg committed Mar 1, 2016
1 parent 97b8ddd commit 7cdf0d5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scraper.php
Expand Up @@ -2,11 +2,15 @@
// This is a template for a PHP scraper on morph.io (https://morph.io)
// including some code snippets below that you should find helpful

// require 'scraperwiki.php';
// require 'scraperwiki/simple_html_dom.php';
require 'scraperwiki.php';
require 'scraperwiki/simple_html_dom.php';
//
// // Read in a page
// $html = scraperwiki::scrape("http://foo.com");
$html = scraperwiki::scrape("https://www.indiegogo.com/projects/lumina-2/#/");
$matches = array();
if(preg_match('/gon\.campaign\=\{(.+?)\}\;/', $html, $matches)){
print_r($matches);
}
//
// // Find something on the page using css selectors
// $dom = new simple_html_dom();
Expand Down

0 comments on commit 7cdf0d5

Please sign in to comment.