⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 quick_quote.php

📁 股票监视器是一个简单的实用工具
💻 PHP
字号:
<?php/** PHP STOCK TRACKER* -----------------* A multi-user utility for creating and managing stock* watchlists and historical analysis.* Copyright (C) 2005 Joshua Eldridge (joshuae74@hotmail.com)*** This program is free software; you can redistribute it and/or modify* it under the terms of the GNU General Public License as published by* the Free Software Foundation; either version 2 of the License, or* (at your option) any later version.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the* GNU General Public License for more details.** You should have received a copy of the GNU General Public License* along with this program; if not, write to the Free Software* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA** See the COPYING file for full details.*/require_once('INCLUDES.inc.php');require_once('inc/header.inc.php');?><div align="right"><a href="javascript:this.close();">Close This Window</a></div><p><center><form name="get_info" action="<?= $_SERVER['PHP_SELF'] ?>" method="post"><input type="text" name="ticker_symbol"><input type="submit" value="Get Quote"></form></center><script language="JavaScript">window.document.get_info.ticker_symbol.focus();</script><?if(checkSecurePost() === true) {    $symbol = strtoupper(getCleanVar($_POST, 'ticker_symbol'));    if($symbol != ''){		$quote = new Quote($symbol);		$quote->query_yahoo();		if($quote->error == '') {			$total_change = round($quote->last_trade - $quote->opened,2);			$html = '<b>' . $quote->stock_name . ' (' . $quote->stock_symbol . ')</b><p>';			$html .= '<table border=0>';			$html .= '<tr><td><b>Last Trade:</td><td>' . $quote->last_trade . '</td></tr>';			$html .= '<tr><td><b>Trade Date/Time:</td><td>' . $quote->trade_date . '(' . $quote->trade_time . ')</td></tr>';			$html .= '<tr><td><b>Opened:</td><td>' . $quote->opened . '</td></tr>';			$html .= '<tr><td><b>Total Change:</td><td>';			if($total_change >= 0) {				$html .= '<span class="green">' . $total_change;			} else {				$html .= '<span class="red">' . $total_change;			}						$html .= '</span></td></tr>';			$html .= '<tr><td><b>Low - High:</td><td>' . $quote->low . ' - ' . $quote->high . '</td></tr>';			$html .= '<tr><td><b>Volume:</td><td>' . number_format($quote->volume) . '</td></tr>';			$html .= '<tr><td colspan=2><img src="' . $quote->chart_url . '"></td></tr>';			$html .= '</table>';			echo $html;		} else {		echo '<font color="red"><b>' . $quote->error . '<BR><a href="http://finance.yahoo.com/q?s=' . $symbol . '" target="new">Try Yahoo!</a></b></font>';	}  }}require_once('inc/footer.inc.php');?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -