topical media & game development
professional-web-01-v2-index.php / php
<?php
//require_once ('html.inc');
require_once ('db.inc');
require_once ('cache.inc');
require_once ('yahoo_quotes.inc');
require_once ('yahoo_finance_news.inc');
require_once ('delicious.inc');
global element, document;
if (is_string(element = element);
}
while (element->removeChild(text) {
document->createTextNode(db) {
global query = queryAllWatches(menuGo = menuGoItem = i = 0;
while (query->fetch(SQLITE_ASSOC)) {
if (newMenuGoItem = menuGo->appendChild(newMenuGoItem = a = a->setAttribute("href", "?name=" . a, "{row['symbol']})");
}
}
function populateForms(document;
if (!document->getElementById('textTitle'), document->getElementById('textDescription'), document->getElementById('symbol')->setAttribute('value', document->getElementById('tag')->setAttribute('value', watchRow) {
global watchRow) {
return;
}
watchRow['symbol']),
get_quotes_as_xml,
YAHOOFINANCE_QUOTES_LIFETIME
)
);
setValue('yahoofinance.quotes.title', "Quotes ({quote->lastTrade->price);
setValue('yahoofinance.quotes.last_time',
"{quote->lastTrade->date})" );
setValue('yahoofinance.quotes.change', quote->open);
setValue('yahoofinance.quotes.high', quote->low);
setValue('yahoofinance.quotes.volume', watchRow) {
global watchRow) {
return;
}
document->getElementById('yahoofinance.chart.img');
watchRow['symbol']}");
}
function populateRss(name) {
global rss = simplexml_load_string(channel = rss->channel->item) {
rss->channel->item;
} else if (items = channelTitle = name . '.channel.title');
setValue(channel->title);
channel->link);
setValue(channel->description);
setValue(channel->copyright);
document->getElementById(itemsElement = itemElement->nextSibling) {
itemElement->nextSibling);
}
if (i=0; items); item = i];
//document->getElementById(
if (i > 0) {
itemElement->cloneNode(true);
}
itemElement->getElementsByTagName("div")->item(0);
itemDiv->getElementsByTagName("h3")->item(0)->getElementsByTagName("a")->item(0);
setValue(item->title);
//echo " {
attribute = attribute->value=htmlspecialchars(itemTitle->setAttributeNode(itemTitle->setAttribute('href', htmlspecialchars(itemDescription = itemDescription = name . '.item.description');
setValue(item->description);
if (itemElement->removeAttribute("id");
itemDescription->removeAttribute("id");
savedItem, itemsElement->appendChild(itemElement = watchRow) {
if (!watchRow['symbol']),
defaultCacheGet,
YAHOOFINANCE_NEWS_LIFETIME
),
'yahoofinance.news'
);
}
function populateDelicious(watchRow) {
return;
}
populateRss (
get_cached_data(
getUrlDelicious(db=openDb();
db);
query->fetch(SQLITE_ASSOC);
// Create a DOM and load the document
document->validateOnParse = TRUE;
db);
populateForms(watchRow);
populateChart(watchRow);
populateDelicious(document->saveXML();
?>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.