PHP script not workin on dream host servers.. HELP
Posted by: dave79
Posted on: 2005-06-01 10:59:00
Ok i am running a phpscript that fetches the info from yahoo.com finance but i cant get it to work http://www.investingpub.com/quotes.php
the code is
<?php
$fd = fopen ("http://quote.yahoo.com/d/quotes.csv?s=AAPL&f=sl1d1t1c1ohgv&e=.csv", "r");
$contents = fread ($fd, 200);
fclose ($fd);
$contents = str_replace (""", "", $contents);
$contents = explode (",", $contents);
echo "<p>Apple stock tracker</p><p>Most recent trade: <b>$$contents[1]</b></p><p>Today's Change: $contents[4]</p><p>(Prices delayed up to 20 minutes.)</p>";
?>
Any help is appreciated.