|
Astrological chart is a usual PNG-format picture which can
be inserted into a website page. The source of this picture
(value of the field "SRC" in tag "IMG")
is not a file, located on your website, but a PERL-script
service, hosted on Urania's website.
How does it work?
When your visitor looks at the chart page, the visitor's
browser addresses the script service and gives it all the
necessary parameters (please, see below the list of parameters
and their description). The script verifies that the page
with the chart belongs to a registered user, then receives
astrological data for the chart from the source on the user's
website, makes calculations, draws the chart and returns it
to the browser as a PNG-format picture (please, see the
simplest example).
URL address of the script:
http://www.urania.ru/cgi-bin/ucs_chart.pl
Script parameters:
- uid - unique user ID
, issued at free registration,
e.g., "u0044";
sid
- unique chart ID, which is used by the service for receiving
astrological chart data, e.g., "chart012" or "MoscowTransits";
size
- optional parameter, which sets chart size in pixels (200
to 1500), default chart size is 500;
backgr
- optional parameter, which sets the chart background color
as an RGB value, e.g., "255,255,255" means the
color white, transparent background is set by value "transparent",
default chart background color is white; it is possible
to set the color by a string in the format used by HTML
language (without symbol #), e.g., value "FFFFFF"
means the color white, and "000000" means the
color black;
rnd
- optional parameter, a random number used for cashing astrological
data and for avoiding cashing of the charts by the browser;
data
- optional parameter, which sets the source of the astrological
data, located on the user's website; it's format is described
below; the service script reads the data source page using
GET method (sending "sid" and "rnd"
parameters, which are useful in case of dynamic data source);
by default, the chart page itself is the data source.
Astrological Data Source
In order to draw a chart, the service reads the data source
using GET method. By default, the chart page itself is the
data source, but it could be any other static or dynamic page
of the user's website.
Dynamically generated source can use parameter "sid"
in order to return only data necessary for drawing the chart
with this identificator.
If the source contains data for several charts (e.g.,
there are four charts drawn on the user's webpage, and this
page is the data for those charts), and parameter "rnd"
of the charts has the same value, then, when drawing these
charts, the service addresses the data source only once, storing
the astrological data in a special cash.
Astrological Data Format
Data for the chart with "sid" identificator
should be sent by the data source as one line of the HTML
comment:
<!--astrodata/sid DATA
/astrodata-->
The browser ignores such comments, and this allow us to include
astrological chart data directly into the HTML-code of the
chart page.
DATA - is the list of astrological
data, divided by spaces, when each astrological parameter
is written in format NAME=VALUE. The list of possible parameters
is below:
- jdate - chart date according
to the Julian calendar, i.e., the moment of time, for which
the chart must be calculated and drawn; when the "jdate"
for the chart is calculated, time has to be converted to
GMT; if the date and the time of the chart are set by "jdate",
alternative method of their setting by "date"
and "time" is ignored;
date
- chart date, according to Gregorian calendar; the date
has to be written in format DD.MM.YYYY;
time
- chart GMT time; the value must be written in format HH.MM.SS.
It time is not set, value 00:00:00 GMT is used when drawing
the chart;
lat
- geographical latitude of the location, set in parts of
a degree; it is positive North of the Equator;
lon
- geographical longtitude of the location, set in parts
of a degree; it is positive East of the Greenwich Meridian;
house
- house system used for drawing the chart; possible values
of this parameters are: Placidus Koch Regiomontanus Campanus
Porphyry Equal Azimut Meridian; if this parameter is not
defined, Placidus cusps are calculated and drawn.
Notes:
- If date and time are not set for the chart, the service
considers such chart as transit chart and draws it for the
current GMT;
Parameters "lat"
are "lon" are required.
This page give the formal description of Urania's commercial
astrological chart service. In order to understand the meaning
of the above parameters and how to give these parameters to
the astrological chart script, please, see examples
of use.
|