Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e49ca70
commit 6254395
Showing
1 changed file
with
5 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,8 @@ | ||
<? | ||
// 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"); | ||
// | ||
// // Find something on the page using css selectors | ||
// $dom = new simple_html_dom(); | ||
// $dom->load($html); | ||
// print_r($dom->find("table.list")); | ||
// | ||
// // Write out to the sqlite database using scraperwiki library | ||
// scraperwiki::save_sqlite(array('name'), array('name' => 'susan', 'occupation' => 'software developer')); | ||
// | ||
// // An arbitrary query against the database | ||
// scraperwiki::select("* from data where 'name'='peter'") | ||
|
||
// You don't have to do things with the ScraperWiki library. | ||
// You can use whatever libraries you want: https://morph.io/documentation/php | ||
// All that matters is that your final data is written to an SQLite database | ||
// called "data.sqlite" in the current working directory which has at least a table | ||
// called "data". | ||
$link = 'http://202.61.43.40:8056/caselaw/rpt_search_simple.php?CASENO=&CASEYEAR=1972&STD_CASETYPES=-1&STD_BENCHTYPES=-1&STD_COURTS=-1'; | ||
$html = file_get_html($link); | ||
echo $html; | ||
?> |