I Teach PHP.com

Apache Apache1.3 to 2.0
Configuration Basics
Install Fedora C1
Install Red Hat 7.2
Install Red Hat 7.3
SSH Clients
Virtual Hosting
links
syllabus
apache-refcard-letter

Bash Bash Shell Tips And Tricks
bash

CSS CSS2 Reference
links
syllabus

DHTML syllabus

HTML Basic HTML Tags
Creating Images
links
syllabus

Linux Install Fedora C1
Install Red Hat 7.2
Install Red Hat 7.3
Linux Basics
SSH Clients
links
mailme

Linux Clusters Cluster Books
Install Fedora C1
Install Red Hat 7.2
Install Red Hat 7.3
SSH Clients
syllabus

Linux Security Install Fedora C1
Install Red Hat 7.2
Install Red Hat 7.3
PHP Security
SSH Clients
Security QuickRef
UnixSecurity2.0
syllabus

Linux SysAdmin Install Fedora C1
Install Red Hat 7.2
Install Red Hat 7.3
PHP Security
SSH Clients
Security QuickRef
UnixSecurity2.0
syllabus
show book

Linux for Business Install Fedora C1
Install Red Hat 7.2
Install Red Hat 7.3
syllabus
show book

PHP 4 page DB system
Install Fedora C1
Install Red Hat 7.2
Install Red Hat 7.3
Linux Basics
PHP Security
Password Protect
Perl CGI Problems
Perl vs. PHP
Yahoo Stocks
links
syllabus

PHP for Flash 1-Flash Intro
2-Flash-PHP Form
Flash-PHP FAQ
Linux Basics
SSH Clients
syllabus

Perl Perl CGI Problems
SSH Clients
syllabus

TCP-IP Subnetting Tutorial
links

WML Yahoo Stocks
links
syllabus

cgi-bin

E-MAIL

Using http://quote.yahoo.com/d/quotes.csv
to display stock price information in CSV format

Yahoo.com has a free feature to allow you to view stock price information. Most users view this via http://finance.yahoo.com with the web pages generated by Yahoo.

However, there is a simpler way which will allow you to get data in the popular CSV (Comma-Separated Values) format for easy parsing by PHP or another programming language.

A typical URL to view data about Red Hat Linux (RHAT) might look like:

http://quote.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&s=rhat

This follows a basic schema of:

http://quote.yahoo.com/d/quotes.csv?f=format_codes&s=stock_symbol

You can have multiple values for s=stock_symbol in a single query for a very efficient method of displaying stock prices. For our sample, we will use one stock at a time.

The format codes known thus far include:

s	'Symbol'
n	'Name'
l	'Last Trade (With Time)'
l1	'Last Trade (Price Only)'
k3	'Last Trade Size'
c	'Change Percent'
c1	'Change'
t7	'Ticker Trend'
v	'Volume'
a2	'Average Daily Volume'
i	'More Info'
t6	'Trade Links'
b	'Bid'
b6	'Bid Size'
a	'Ask'
a5	'Ask Size'
p	'Previous Close'
o	'Open'
m	'Day's Range'
w	'52-week Range'
j5	'Change From 52-wk Low'
j6	'Pct Chg From 52-wk Low'
k4	'Change From 52-wk High'
k5	'Pct Chg From 52-wk High'
e	'Earnings/Share'
r	'P/E Ratio'
s7	'Short Ratio'
r1	'Dividend Pay Date'
q	'Ex-Dividend Date'
d	'Dividend/Share'
y	'Dividend Yield'
f6	'Float Shares'
j1	'Market Capitalization'
t8	'1yr Target Price'
e7	'EPS Est. Current Yr'
e8	'EPS Est. Next Year'
e9	'EPS Est. Next Quarter'
r6	'Price/EPS Est. Current Yr'
r7	'Price/EPS Est. Next Yr'
r5	'PEG Ratio'
b4	'Book Value'
p6	'Price/Book'
p5	'Price/Sales'
j4	'EBITDA'
m3	'50-day Moving Avg'
m7	'Change From 50-day Moving Avg'
m8	'Pct Chg From 50-day Moving Avg'
m4	'200-day Moving Avg'
m5	'Change From 200-day Moving Avg'
m6	'Pct Chg From 200-day Moving Avg'
s1	'Shares Owned'
p1	'Price Paid'
c3	'Commission'
v1	'Holdings Value'
w1	'Day's Value Change'
g1	'Holdings Gain Percent'
g4	'Holdings Gain'
d2	'Trade Date'
g3	'Annualized Gain'
l2	'High Limit'
l3	'Low Limit'
n4	'Notes'
k1	'Last Trade (Mkt with Time)'
b3	'Bid (Mkt)'
b2	'Ask (Mkt)'
k2	'Change Percent (Mkt)'
c6	'Change (Mkt)'
v7	'Holdings Value (Mkt)'
w4	'Day's Value Change (Mkt)'
g5	'Holdings Gain Percent (Mkt)'
g6	'Holdings Gain (Mkt)'
m2	'Day's Range (Mkt)'
j3	'Market Cap (Mkt)'
r2	'P/E (Mkt)'
c8	'After Hours Change (Mkt)'
i5 	'Order Book (Mkt)'


This site contains files and links to support the free courses taught by James D. Keeline at the New Media Center / North City Center through the San Diego Community College District's Centers For Education and Technology.   A list of courses available at the center may be consulted.

The site will be updated throughout the semester both with new content and as a way to try out technologies used in several of the classes. This file modified 14-Jan-2007.