-1

Código:

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

Erros:

Notice: file_get_contents(): send of 16 bytes failed with errno=10053 Uma conex�o estabelecida foi anulada pelo software no computador host. 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 Uma conex�o estabelecida foi anulada pelo software no computador host. 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 Uma conex�o estabelecida foi anulada pelo software no computador host. 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 Uma conex�o estabelecida foi anulada pelo software no computador host. 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

Como poderia solucionar esse problema?

Observação: g1.globo.com é apenas um exemplo.

1 Resposta 1

0

Verifique se a opção allow_url_fopen e está ativo no seu servidor, esta configuração geralmente pode ser feita via php.ini.

2
  • Verifiquei e está sim, amigo. "allow_url_fopen=On" 28/05/2017 às 18:16
  • Esta classe simple_html_dom ela faz o que, você que a fez? 28/05/2017 às 20:44

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .