[insert_php]
if (isset($_POST[“sectorpricelist”])){
$json=file_get_contents(“http://data.calminfo.com/services/stock/services/research.php?action=pricelists&date1=” .$_POST[“sectorpricelist”].”&date2=”.$_POST[“sectorpricelist”]);
}
else
{
$json=file_get_contents(“http://data.calminfo.com/services/stock/services/research.php?action=current_daily_price_lists”);
}
$pricelist = [];
$o = json_decode($json);
echo ‘
‘;
echo ‘
‘;echo ‘
| Security Code | Previous Price | Change | Volume | Value | Opens | High | Low |
|---|---|---|---|---|---|---|---|
| ‘ .$sectorpricelist->securityCode .’ | ‘.round($sectorpricelist->pclose, 2).’ | change <0 ){echo 'style="color:red; font-weight:bold;"';} else if ($sectorpricelist->change >0 ){echo ‘style=”color:green; font-weight:bold;”‘;}echo ‘>’ .round($sectorpricelist->change,2).’ | ‘.number_format($sectorpricelist->volume, 2).’ | ‘ .number_format($sectorpricelist->value,2).’ | ‘.round($sectorpricelist->opens, 2).’ | ‘ .round($sectorpricelist->high,2).’ | ‘.round($sectorpricelist->low,2).’ |
‘;
echo ‘
[/insert_php]