Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Is it not doing anything at all, or is it just sporadic? It seems to be working for me, although I noticed that not all of the stocks I have are being updated and some of the indexes produce weird results. I'll keep monitoring it over the next few days to see if it is actually updating the data.
Yahoo did change their finance site, so I do expect problems, but I didn't expect them so soon, and I'm not sure to what level the problems will be, i.e. whether everything will need to be rewritten, or just some updating will need to be done.
i was running a modified version of stockapi and stock on my site then i took my site down for a few months and moved to a different server. after getting it up and running on the new server i was getting an error that said it couldn't retrieve the file contents from yahoo. i couldn't remember if i had made any changes before taking the site down that would cause this, so i set up a sub-domain with it's own drupal installation, then i installed the lastest versions of stockapi and stock. i'm not getting any error messages but it's not showing any stock data and the stockapi table is empty.
oadaeh, I realized that the module still appears to work fine, which I'm sure you already knew. My problem was that I moved from a host that allowed file_get_contents() to a host that has it disabled (dreamhost.com). I was able to get it working by using cURL instead of file_get_contents().
Most of stockapi_fetch function is the same, the only thing that is different is method for getting the file contents. I just wanted to share this in case others encounter a host that has disabled php's file() and get_file_contents().
Comments
Comment #1
oadaeh commentedIs it not doing anything at all, or is it just sporadic? It seems to be working for me, although I noticed that not all of the stocks I have are being updated and some of the indexes produce weird results. I'll keep monitoring it over the next few days to see if it is actually updating the data.
Yahoo did change their finance site, so I do expect problems, but I didn't expect them so soon, and I'm not sure to what level the problems will be, i.e. whether everything will need to be rewritten, or just some updating will need to be done.
Comment #2
crick commentedi was running a modified version of stockapi and stock on my site then i took my site down for a few months and moved to a different server. after getting it up and running on the new server i was getting an error that said it couldn't retrieve the file contents from yahoo. i couldn't remember if i had made any changes before taking the site down that would cause this, so i set up a sub-domain with it's own drupal installation, then i installed the lastest versions of stockapi and stock. i'm not getting any error messages but it's not showing any stock data and the stockapi table is empty.
Comment #3
crick commentedoadaeh, I realized that the module still appears to work fine, which I'm sure you already knew. My problem was that I moved from a host that allowed file_get_contents() to a host that has it disabled (dreamhost.com). I was able to get it working by using cURL instead of file_get_contents().
Most of stockapi_fetch function is the same, the only thing that is different is method for getting the file contents. I just wanted to share this in case others encounter a host that has disabled php's file() and get_file_contents().
Comment #4
sampelo commented