Ssalustri
Ssalustri

Reputation: 1

Retrieve the DOM from a variable with Simple HTML DOM Parser?

I'm using Simple HTML DOM Parser to retrieve informations from a website with this code:

$html = file_get_html("http://www.example.com/"]);
$table = $html->find("div[class=table]");

foreach ( $table as $tabella ) {
    $title = $tabella->find (".elementTitle");
    echo "<h2>" . $title[0] -> plaintext . "</h2>"; 
    $minisito = $tabella->find ("h1[class=elementTitle] a");
    echo "<p>" . $minisito[0] -> href . "</p>";     
}

Now I need to extract other pieces of contents from the url contained in this specific urls $minisito[0] -> href

How can I create another variable using file_get_html command to extract data from this new urls?

Upvotes: 0

Views: 188

Answers (0)

Related Questions