Skip to content

Commit

Permalink
Update scraper.php
Browse files Browse the repository at this point in the history
  • Loading branch information
vikash12345 committed Sep 7, 2017
1 parent a2c345e commit 5762a69
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions scraper.php
Expand Up @@ -4,22 +4,13 @@
require 'scraperwiki.php';
require 'scraperwiki/simple_html_dom.php';

$string = "<div id='container'><div>im a text node</div><div>im another</div></div>";
$html = str_get_html($string);
foreach($html->find("text") as $ht) {
$ht->innertext .= "<span>end of each text node</span>";
}
$html->save();
echo $html; // echo modified html


/*
$NewLink = 'http://globalcontact.com/gc/directory/search.php?table=USDIR';
$html = file_get_html($NewLink);
$var = 'Hello';
$input = $html->find('input[type=text]', 0);
$input = $html->find('input[type=text]->value['a']', 0);

echo $input;

//code


Expand Down

0 comments on commit 5762a69

Please sign in to comment.