dont know what it is, im so blind>_<
Parse error: parse error, unexpected ';' in /xxxxx/xxxxx/xxxxx/forum/includes/cron/stockcron.php on line 40
PHP Code:
$getstocks= $DB_site->query("SELECT stockid, stocksym, lastupdate FROM " . TABLE_PREFIX . "stocks WHERE active=1");
while($stock= $DB_site->fetch_array($getstocks))
{
if($yahoo= fopen("http://finance.yahoo.com/d/quotes.csv?s=" . $stock['stocksym'] . "&f=sl1d1t1c1ohgv&e=.csv", "r"))
{
$quotecsv = fgetcsv($yahoo, 1024);
$quote['sym']= $quotecsv[0];
$quote['lasttrade']= $quotecsv[1];
$quote['update_date']= $quotecsv[2];
$quote['update_time']= $quotecsv[3];
$quote['date']= explode('/', $quote['update_date']);
$quote['time']= explode(':', $quote['update_time']);
$quote['minutes']= substr($quote['time'][1], 0, 2);
$quote['meridiem']= substr($quote['time'][1], 2, 2);
if($quote['meridiem'] = "pm")
{
$quote['time'][0]+12;
}
$quote['update']= gmmktime($quote['time'][0], $quote['minutes'], 0, $quote['date'][0], $quote['date'][1], $quote['date'][2]);
$quote['change']= $quotecsv[4];
$quote['open']= $quotecsv[5];
$quote['day_highrange']= $quotecsv[6];
$quote['day_lowrange']= $quotecsv[7];
$quote['volume']= $quotecsv[8];
if($quote['update'] > $stock['lastupdate'])
{
$DB_site->query("UPDATE " . TABLE_PREFIX . "stocks SET lastupdate=" . $quote['update'] . ", selling=" . intval($quote['lasttrade']) . ",
open=" . intval($quote['open']) . ", dayrange_low=" . intval($quote['day_rangelow']) . ",
dayrange_high=" . intval($quote['day_rangehigh'] . ", volume=" . intval($quote['volume']) . ",
change=" . intval($quote['change']) . "
WHERE stockid=" . $stock['stockid']. "
40: ");
}
fclose($yahoo);
}
}