PHP Parsing Conundrum - "Missing Symbols Listed" -


i trying access yahoo site getting stock quotes:

http://de.finance.yahoo.com/d/quotes.csv?s=^dji&f=nsl1op&e=.csv 

and doesn't seem downloading data. "missing symbols listed.". weird b/c used work!

<?php  function market_value($s) {      $records= fopen ("http://quote.yahoo.com/d/quotes.csv?s=$s&f=nsl1&e=.csv");     $contents = fread ($records);     fclose ($records);      $data = str_replace ("\"", "", $data);     $data = explode (",", $data);      $trade= $data[2];      return (".$trade.")"; } 

^dji can not queried yahoo, seems. you should use indu. try downloading

http://finance.yahoo.com/d/quotes.csv?s=indu,goog,msft&f=nsl1op&e=.csv 

this should return like

"dow jones industr","^dji",12069.94,12057.34,12058.02 "google inc.","goog",601.74,600.06,600.76 "microsoft corpora","msft",26.13,26.10,26.16 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -