<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19298">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Here is the code that is called from apache web
server </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial><A
href="http://vk4tec.no-ip.org/cgi-bin/aprs_share.cgi">http://vk4tec.no-ip.org/cgi-bin/aprs_share.cgi</A> (
example only - it does not work ) </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>//</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>#!/usr/bin/perl<BR>use DBI;<BR>my $database_handler
=
DBI->connect("DBI:mysql:database=aprs;host=localhost;port=3306","root","");<BR>print
("Content-type: text/html\n\n");<BR>print "<?xml version=\"1.0\"
encoding=\"UTF-8\"?> \n";<BR>print "<kml xmlns=\"<A
href="http://earth.google.com/kml/2.0\">http://earth.google.com/kml/2.0\</A>">
\n";<BR>#print "<document>\n";<BR>print "<Folder>\n";<BR>print
"<name>APRS</name>\n";</FONT></DIV>
<DIV><FONT size=2 face=Arial>#<BR># Styles<BR>#</FONT></DIV>
<DIV><FONT size=2 face=Arial>print '<Style id="failed">';<BR>print
"<LineStyle>";<BR>print "<color>66ffff00</color>";<BR>print
"</LineStyle>";<BR>print '<PolyStyle>';<BR>print
'<color>66ffff00</color>';<BR>print '</PolyStyle>';<BR>print
'</Style>';<BR>print '<StyleMap id="failed0">';<BR>print
'<Pair>';<BR>print '<key>normal</key>';<BR>print
'<styleUrl>#failed1</styleUrl>';<BR>print '</Pair>';<BR>print
'<Pair>';<BR>print '<key>highlight</key>';<BR>print
'<styleUrl>#failed</styleUrl>';<BR>print '</Pair>';<BR>print
'</StyleMap>';<BR>print '<Style id="failed1">';<BR>print
"<LineStyle>";<BR>print "<color>66ffff00</color>";<BR>print
"</LineStyle>";<BR>print '<PolyStyle>';<BR>print
'<color>66ffff00</color>';<BR>print '</PolyStyle>';<BR>print
'</Style>';</DIV>
<DIV>#<BR># APRS plot<BR>#</DIV>
<DIV>$query="select distinct callsign,latitude,longitude from aprs_targets order
by callsign";<BR>$statement_handler=$database_handler->prepare
($query);<BR>$statement_handler->execute;<BR>while (($callsign,$lat,$lon) =
$statement_handler -> fetchrow())<BR>{<BR>print "<Placemark>\n";</DIV>
<DIV>print "<name>$callsign</name>";<BR>print
"<LookAt>\n";<BR>print
"<longitude>".$lon."</longitude>\n";<BR>print
"<latitude>".$lat."</latitude>\n";<BR>print
"</LookAt>\n";<BR>print
"<styleUrl>#msn_placemark_square</styleUrl>";<BR>print
"<Style>\n";<BR>print "<LabelStyle>\n";<BR>print
"<scale>0.7</scale>\n";<BR>print "</LabelStyle>\n";<BR>print
"<IconStyle>\n";<BR>print "<scale>0.6</scale>";<BR>print
"<heading>".$track."</heading>";<BR>print "<Icon>\n";<BR>print
"<href>http://maps.google.com/mapfiles/kml/shapes/placemark_square.png</href>";<BR>print
"</Icon>\n";<BR>print "</IconStyle>\n";<BR>print
"</Style>\n";<BR>print "<Point>\n";<BR>print
"<coordinates>";<BR>print "$lon,$lat,100";<BR>print "</coordinates>
\n";<BR>print "</Point>\n";<BR>print "</Placemark>\n";<BR>}</DIV>
<DIV>print "</Folder>\n";</DIV>
<DIV>print "</kml> \n";<BR></FONT></DIV></BODY></HTML>