Simple Html does not return anything?

-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;

Errors:

  

Notice: file_get_contents (): send of 16 bytes failed with errno = 10053   An established connection has been canceled 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 has been canceled 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 has been canceled 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 has been canceled 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 ( link ): 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 you solve this problem?

Note: g1.globo.com is just an example.

    
asked by anonymous 27.05.2017 / 23:22

1 answer

0

Make sure the allow_url_fopen option is active on your server, this setting can usually be done via php.ini.

    
28.05.2017 / 01:41