I want to analyze a dynamically generated CSV file that is located on another server (Yahoo Finance), but from what I read, you cannot access content on another server using XMLHTTPRequest, at least not in CSV format.
I was thinking of a solution to this problem, and I would like to know if this is the "right" way or the best practice for this, since I am relatively new to development. This is what I came up with using PHP:
<?php
$symbol = $_GET["s"];
$path = "http://download.finance.yahoo.com/d/quotes.csv?s=" . $symbol . "&f=sl1d1t1c1ohgv&e=.csv";
$yahooquote = fopen($path, "r");
while(!feof($yahooquote))
{
$line = fgets($yahooquote, 1000);
echo $line . "<br />";
}
fclose($yahooquote);
?>
This returns an html file that has the lines of the CSV file, and then I can use JavaScript / jQuery XMLHTTPRequest to parse it on the client side.
? - /? , , , 10 , +100. .