Jump to content

DragonWarden

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

DragonWarden's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I used fopen and file_get_contents to fetch the contents of a URL with no problems on my webhoster's site, which runs PHP 4.4.2 with Apache 1.3.34 (Unix). I then set up (for the first time) a home server (Windows XP64) running PHP 5.1.2 with Apache 2.0.55. When I try to retrieve the page [a href=\"http://www.google.com\" target=\"_blank\"]http://www.google.com[/a] using either function on my home server, I get the following errors (with the appropriate function name substituted): Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\apache\Apache2\htdocs\CD\index.php on line 33 Warning: file_get_contents(http://www.google.com) [function.file-get-contents]: failed to open stream: No error in C:\apache\Apache2\htdocs\CD\index.php on line 33 When I make the attempt on my webhoster's site, it works without problems. I have made sure that allow_url_fopen in php.ini is enabled, as some google searches had suggested. I have also tried fiddling with the user_agent field as some suggested that Apache's rejecting the request somehow due to that, but I have not been successful in banishing the warning. Does anyone have any other suggestions?
×
×
  • 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.