Das Originalprogramm wird auf http://alder-digital.de/earth.php ausgeführt und mit den Geokoordinaten vom Geohack auf dem Toolserver gestartet.
<?php
$kmzsupported = is_numeric(strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.google-earth.kmz'));
if ($kmzsupported) {
require('zip.lib.php'); # in-memory zip implementation from phpMyAdmin
header('Content-type: application/vnd.google-earth.kmz');
header('Content-disposition: inline; filename=doc.kmz');
} elseif(preg_match('/^Opera/', $_SERVER['HTTP_USER_AGENT'])) {
header('Content-type: application/kml');
} else {
header('Content-type: application/vnd.google-earth.kml+xml');
header('Content-disposition: inline; filename=doc.kml');
}
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>wikilink2.kml</name>
<Style id="khStyle542">
<LineStyle id="khLineStyle545">
</LineStyle>
<PolyStyle id="khPolyStyle544">
</PolyStyle>
<IconStyle id="khIconStyle546">
<Icon>
<href>root://icons/palette-5.png</href>
<x>192</x>
<y>128</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
<LabelStyle id="khLabelStyle548">
</LabelStyle>
</Style>
<Placemark>
<?php
$name=$_GET['name'];
if ($name=="") $name="Wikipedia";
$long=$_GET['long'];
$lat=$_GET['lat'];
echo " <name>$name</name>";
echo " <LookAt>";
echo " <longitude>$long</longitude>";
echo " <latitude>$lat</latitude>" ;
echo ' <range>3200</range>';
echo ' <tilt>4.96e-011</tilt>';
echo ' <heading>1.05</heading>';
echo ' </LookAt>';
echo ' <styleUrl>#khStyle542</styleUrl>';
echo ' <Point>';
echo ' <coordinates>';
echo $long.",".$lat;
echo ',0</coordinates> ';
echo '</Point> </Placemark> </Document> </kml>';
?>