Jump to content

simple html dom


chupacabrot

Recommended Posts

i am trying to extract all the anchor texts that have the _blank attribute but for some reason it won't work as i expected (shows a blank screen) -

<?php

require('simple_html_dom.php');
libxml_use_internal_errors( true);
$url = 'http://www.siteforexample.com/example.html';

$html = file_get_html($url);

foreach(($html->find('a[_blank]')) as $clz)  echo $clz->innertext . '<br>';

?>
Link to comment
https://forums.phpfreaks.com/topic/285608-simple-html-dom/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.