i have found the solution. Mysql allows you to save your lines and cols from csv without reading the lines in complex loops:
$url = "http://finance.yahoo.com/d/quotes.csv?s=AAPL+MSFT+GOOG&f=...the datas you need=.csv";
$sql = "LOAD DATA LOCAL INFILE '" . $url . "'
INTO TABLE `" . $data_tablename . "`
FIELDS
TERMINATED BY ','
OPTIONALLY ENCLOSED BY '\"'
LINES
TERMINATED BY '\n'
(`your_cols`,``,.....)";
mysql_query($sql)or die(mysql_error());
my script took me 250 sec on the server but now just 45 sec's. Amazing profit of time....