Re: Yahoo-dowload problem

From: Date: Wed, 06 Sep 2000 22:30:14 +0000
Subject: Re: Yahoo-dowload problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-15602@lists.php.net to get a copy of this message
fgets will stop reading at \n something like : while ($str = fgets($fpread, 1000)) $quotes[] = $str; fclose ($fpread); for($i=0,$l=count($quotes); $i < $l; $i++) echo "got a quote: " . $quotes[$i]; keep in mind each entry will have a \n on it, so chomp or chop it off at yer leisure hope this helps -r ----- Original Message ----- From: <p@pyramid.v.pl> To: <php-general@lists.php.net> Sent: Wednesday, September 06, 2000 5:25 PM Subject: [PHP] Yahoo-dowload problem > Hi > > On Yahoo-Site is a link: > > > http://uk.finance.yahoo.com/d/quotes.csv?s=@DAX30.FX&f=sl1t1c > 1ghov&e=.csv > > with 30 quotes of DAX-Shares. > > I try dowloadt the file as follow: > <? > > $webfile = "http://uk.finance.yahoo.com/d/quotes.csv?s=@DAX30.FX&f=sl1t1c1ghov&e=.csv"; > $fpread = fopen($webfile, 'r'); > $ile=fgets($fpread, 1000); > fclose($fpread); > > echo ($ile); > > > > ?> > > and recive only 1 (one) quote. > > Anyone help me to download all 30 quotes, pls ? > > > Krzysztof Szachun > krzysztof.szachun@pyramid.pl > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#15602) next »