Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> Android開發 >> 高級開發 >> 用PHP編寫Android應用程序(4)

用PHP編寫Android應用程序(4)

編輯:高級開發

;">http://quoter.take88.com/?ticker=%s');
require_once("android.PHP");
$droid = new android();
$action = 'get_tickers';$tickers = '';
while (TRUE) { switch ($action) {
case quote':$droid->dialogCreateSpinnerProgr

ss("Querying stock information server ...", Please wait");$droid->dialogShow();
$quotes = @array_slice(JSon_decode(file_get_contents(sprintf(QUOTE_SERVER, tickers))), 0, 3);
$droid->vibrate();
$droid->dialogDismiss();// Possible data points.// SYMBOL","NAME","LAST_TRADE","MORE_INFO","LAST_TRADE_DATE","LAST_TRADE_TIE","OPEN","DAYS_HIGH","DAYS_LOW","DIVIDEND_SHARE","PE_RATIO","52_WEEK_LOW,"52_WEEK_HIGH","VOLUME"$output =
'';for
($i = 0, $cnt = count($quotes);
$i < $cnt; $i++)
{
$output .= "Company: " . $quotes[$i]->NAME ."\n";
$output .= "Ticker: " . $quotes[$i]->SYMBOL . "\n";
$output .= "Last trade: $" . $quotes[$i]->LAST_TRADE . "\n";
$output .= "\n";
}
$output = Html_entity_decode($output, ENT_QUOTES, "UTF-8");
// Something is wrong with

  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved