News & Quotes Ticker Applet

Perfect stocks and RSS ticker for your website!

DOCS > Data Feeds

Applet reads data from URL specified in feed parameter. This URL must be a link on the same server as the HTML file the applet is inserted in (due to Java security restrictions).

Quotes Feed Specification

Applet calls the feed for each symbol like this:

http://your-server.com/path-to-script/feed.php?symbols=MSFT

This is done for each symbol, one after an other, until all list is done, and then it starts from the beginning.

You can build your own data feeds as long as it responds to symbol parameter with same output as below:

NAME1:VALUE1
NAME2:VALUE2

sample output for MSFT stock:

----START OUTPUT----
SYMBOL:MSFT
LAST TIME:10:46am
LAST:25.21
CHANGE:-0.17
CHANGEP:-0.67%
BID:25.21
ASK:25.22
TREND:-
----END OUTPUT----

TREND field determines colors and icons for a stock. Accepted trend values are: + for positive trend, - for negative trend, 0 for neutral trend

The sample script we provide for quotes is feed-quotes-random.php. Using this script you can see how to build your own data script to the data feed you will be using.

HTML code for setting up 'feed' parameter for quotes version, looks like:

<param name="feed" value="http://www.yourdomain.com/feed.php">

News Feed Specification

News output is very simple: for each news one line is title and one is link to news. Sample output:

----START OUTPUT----
Paris Hotel Fire Kills at Least 20 People (AP)
http://news.yahoo.com/...........
Congress Passes Bankruptcy Reform Bill (AP)
http://news.yahoo.com/...........
----END OUTPUT----

The script we provide for news is "news-rss.php" for PHP and "news-rss.asp" for ASP (JScript)

HTML code for setting up 'feed' parameter for news version, looks like:

<param name="feed" value="http://www.yourdomain.com/news-rss.php">