karenk Posted March 22, 2017 Share Posted March 22, 2017 Hi When attempting to open this file and get a quote (KO) coca cola, NYSE I get the following error: (Please note that this file is directly from the downloads) Have I done something wrong? Tx Karen Warning: fopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /var/www/html/php_advanced/ch10/get_quote.php on line 18Warning: fopen(http://quote.yahoo.com/d/quotes.csv?s=KO&f=nl1): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /var/www/html/php_advanced/ch10/get_quote.php on line 18Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /var/www/html/php_advanced/ch10/get_quote.php on line 21Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/html/php_advanced/ch10/get_quote.php on line 24 The latest value for (KO) is $.Enter a NYSE stock symbol to get the latest price: Link to comment Share on other sites More sharing options...
Larry Posted March 24, 2017 Share Posted March 24, 2017 Interesting! When I click on the Yahoo! link to access it in my browser, it does work, so that's not the problem. My best guess is this is a server problem, specifically with the DNS. You can confirm this by changing "quote.yahoo.com" to 72.30.203.4 (Yahoo's IP address) and seeing if it works then. Link to comment Share on other sites More sharing options...
Recommended Posts