コード例 #1
0
ファイル: index.php プロジェクト: devsnippet/WeChat-2
 private function receiveText($object)
 {
     $keyword = trim($object->Content);
     $category = substr($keyword, 0, 6);
     $code = trim(substr($keyword, 6, strlen($keyword)));
     switch ($category) {
         case "股票":
             include "stock.php";
             $content = getStockInfo($code);
             break;
         case "分析":
             include "analysis.php";
             $content = getStockAnalysis($code);
             break;
         default:
             $content = "不支持的命令";
             break;
     }
     if (is_array($content)) {
         $result = $this->transmitNews($object, $content);
     } else {
         $result = $this->transmitText($object, $content);
     }
     return $result;
 }
コード例 #2
0
ファイル: info.php プロジェクト: hli010/stockmonitor
<td> 新闻动态 </td>
<td>  </td>
</tr>

<tr>
<td> 2 </td>
<td> 微博 </td>
<td>  </td>
</tr>
</table>

<hr>

<?php 
function getStockInfo($id)
{
    $bruce = readfile("http://finance.sina.com.cn/futures/quotes/{$id}.shtml");
    echo $bruce;
}
getStockInfo("IC1507");
?>



</body>


</html>


コード例 #3
0
ファイル: database.php プロジェクト: morgonfrilla/SA
            break;
        case 'insertStockHistory':
            $ysymbol = $_GET['symbol'];
            $date = $_GET['date'];
            $open = $_GET['open'];
            $high = $_GET['high'];
            $low = $_GET['low'];
            $close = $_GET['close'];
            $volume = $_GET['volume'];
            $adj_close = $_GET['adj_close'];
            insertStockHistory($con, $ysymbol, $date, $open, $high, $low, $close, $volume, $adj_close);
            break;
        case 'updateStockHistory':
            updateStockHistory($con);
            break;
        case 'addStockHistory':
            addStockHistory($con);
            break;
        case 'updateStocksInfo':
            updateStocksInfo($con);
            break;
        case 'getStockInfo':
            getStockInfo($con);
            break;
    }
}
mysqli_close($con);
?>
/*
Name as Name, stocks.Symbol as Symbol, stocks.Ysymbol as Ysymbol, Valuta as Valuta, ISIN as ISIN, Sektor as Sektor, ICB as ICB, Owned as Owned, BuyPrice as BuyPrice, Category as Category, Ask as Ask, AskRealtime as AskRealtime, AverageDailyVolume as AverageDailyVolume ,Bid as Bid, BidRealtime as BidRealtime,`Change` as Change, ChangeFromFiftydayMovingAverage as ChangeFromFiftydayMovingAverage, ChangeFromTwoHundreddayMovingAverage as ChangeFromTwoHundreddayMovingAverage, ChangeFromYearHigh as ChangeFromYearHigh, ChangeFromYearLow as ChangeFromYearLow, ChangePercentRealtime as ChangePercentRealtime, ChangeRealtime as ChangeRealtime, Change_PercentChange as Change_PercentChange, ChangeinPercent as ChangeinPercent, DaysHigh as DaysHigh, DaysLow as DaysLow, DividendPayDate as DividendPayDate, DividendShare as DividendShare, DividendYield as DividendYield, LastTradeDate as LastTradeDate, LastTradePriceOnly as LastTradePriceOnly, Open as Open, PercebtChangeFromYearHigh as PercebtChangeFromYearHigh, PercentChange as PercentChange, PercentChangeFromFiftydayMovingAverage as PercentChangeFromFiftydayMovingAverage, PercentChangeFromTwoHundreddayMovingAverage as PercentChangeFromTwoHundreddayMovingAverage, PercentChangeFromYearLow as PercentChangeFromYearLow, PreviousClose as PreviousClose, Volume as Volume, YearHigh as YearHigh, YearLow as YearLow*/