Joined: Tue Nov 03, 2009 7:48 pm Posts: 1 Has thanked: 0 time Have thanks: 0 time
hi
i have write a php code to get yahoo stock data , when i fetch the web data it saves the data as text file in to host server local drive (c:\ ), but i want to save the yahoo stock data from any remote pc from where i browse the page and it saves the data as text file automatically in local pc's c drive . is there any way to do this , please help........... here is the code
Code:
$quotes =array('DOW','SPX','GOLD','OIL','AIG','APPLE','AMGN','BAC','DISH', 'DO','DIRECTV','FEDEX','GOOG','HD','IBM','INTEL','IP','COLA','LOWES', 'YEN','EUR','HK','JAP','AUS','INDIA'); //here you can out symbols of stock data $args = implode('&s=', $quotes); //$file = fopen("http://finance.yahoo.com/d/quotes.csv?s=$args&f=slp11d1t1c1ohgv&ej3j1x=.csv", "rb"); $file = fopen ("http://finance.yahoo.com/d/quotes.csv?s=$args&f=noc1&ex=.csv","r"); $data = array(); $table ='';
if ($file){ while($stocks = fgetcsv($file)){ $data[$stocks[0]]= $stocks; } fclose($file); }
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum