Simple Html returns nothing?

Asked

Viewed 61 times

-1

Code:

require_once("simple_html_dom/simple_html_dom.php");
html = new simple_html_dom();
$html->load_file('http://www.g1.globo.com/');
echo $html;

Mistakes:

Notice: file_get_contents(): send of 16 bytes failed with Errno=10053 An established connection was overridden by the software on the host computer. in C: xampp htdocs simple_html_dom simple_html_dom.php on line 1081

Notice: file_get_contents(): send of 24 bytes failed with Errno=10053 An established connection was overridden by the software on the host computer. in C: xampp htdocs simple_html_dom simple_html_dom.php on line 1081

Notice: file_get_contents(): send of 19 bytes failed with Errno=10053 An established connection was overridden by the software on the host computer. in C: xampp htdocs simple_html_dom simple_html_dom.php on line 1081

Notice: file_get_contents(): send of 2 bytes failed with Errno=10053 An established connection was overridden by the software on the host computer. in C: xampp htdocs simple_html_dom simple_html_dom.php on line 1081

Warning: file_get_contents(http://www.g1.globo.com/): failed to open stream: HTTP request failed! in C: xampp htdocs simple_html_dom simple_html_dom.php on line 1081

Fatal error: Call to a Member Function innertext() on null in C: xampp htdocs simple_html_dom simple_html_dom.php on line 1688

How could I solve this problem?

Note: G1.globo.com is just one example.

1 answer

0

Check if the option allow_url_fopen and is active on your server, this configuration can usually be done via php.ini.

  • I checked and you are, buddy. "allow_url_fopen=On"

  • This class simple_html_dom She does what, you made her?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.