1

i am having a problem with PHP file_get_contents.

$html = file_get_html($csfd_link); 

Writes an error:

Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/vo003500/www_root/admin/simple_html_dom.php on line 76

Warning: file_get_contents(http://www.example.com/) [function.file-get-contents]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/vo003500/www_root/admin/simple_html_dom.php on line 76

I do not know what it is. The server is allow_url_fopen ON

Thanks

Edit: Until now it worked, but the last 2 weeks not working...

2
  • 4
    It means it cannot translate a DNS name into an IP.... Commented Jul 3, 2013 at 8:45
  • What is in the variable $csfd_link? You'll probably find it's not a valid file name or URL. Commented Jul 3, 2013 at 8:49

1 Answer 1

2

It looks like your suffering from DNS (Domain Name Service) resolution error. Make sure there is a proper DNS server entry in /etc/resolv.conf.

Sign up to request clarification or add additional context in comments.

1 Comment

This is not an answer, it should be a comment since it's just suggestion not solution.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.