Skip to content

Instantly share code, notes, and snippets.

@element121
Last active August 7, 2016 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save element121/e675f26fd97e25c9c42c to your computer and use it in GitHub Desktop.
Save element121/e675f26fd97e25c9c42c to your computer and use it in GitHub Desktop.
include('simple_html_dom.php');
// Call a remote file
$html = file_get_html("http://ww.site-to-scrape.com/page.php");
// Then access the DOM to find what you need, for example the title of the web page:
foreach($html->find('title') as $e)
{
echo $e->innertext . '<br>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment