FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

the get_file_contents function doesn't work anymore

 


aswapathy
What must I do to enable it?
mOrpheuS
aswapathy wrote:
the get_file_contents function doesn't work anymore

I'm assuming you received some sort of error message when trying to use this function.

If yes, can you share it with us ?
aswapathy
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/aswapath/public_html/stocks/retrieve_high_yield_stocks.php on line 28

Then subsequent functions fail because no file contents were "got".

Here's what line 28 looks like:

$content = file_get_contents("http://screen.yahoo.com/b?dvy=10/&s=nm&vw=1&db=stocks&b=1");

which works on my local server, and used to work on this one.
mOrpheuS
This looks like a DNS problem

aswapathy wrote:
$content = file_get_contents("http://screen.yahoo.com/b?dvy=10/&s=nm&vw=1&db=stocks&b=1");
Try changing that line to
Code:
$content = file_get_contents("http://66.218.71.187/b?dvy=10/&s=nm&vw=1&db=stocks&b=1");
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.