Hi,
I have a test page here: [
tradingrecord.com...]
If you refresh 5 or so times you'll notice the data gets messed up.
I have done the same with:
[
finance.yahoo.com...]
The source data looks fine when I refresh that page a bunch of times. So it seems like when it's coming through fopen() it randomly gets garbled. Looks like it's due to some special characters.
if(($handle = fopen('http://finance.yahoo.com/d/quotes.csv?s=AMZN&f=snxl1bc1d1t1jkmj1op2ahvet8ydpa2rb6', 'r')) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ',')) !== FALSE) {
print_r($data);
}
}
fclose($handle);
exit;
This was working up until last weekend (Saturday or Sunday) so I have no idea what changed. yum may have updated something but I ended up upgrading to PHP 5.3.3 and it still happens.
Really stumped as to what happened and what could be the problem.
Anybody have an idea of what it could be or any solutions?
Thanks,
Bryan