Using PHP and MySQL to Create KML - Tutorial
by Mano
Marks
http://code.google.com/support/bin/answer.py?answer=69906
15 Minutes or less to SetUp - Create
Database , Create Table , Populate Table



Copy PHP Scripts to c:\wamp\www\test
Open with notepad and Edit as shown below
<?php $username="root"; $password=""; $database="TEST_DB"; ?>
Note: you are able to use the above username and password settings because the MySQL server is not secure. This is mentioned at the bottom of the opening page of phpMyAdmin. Configure "Privileges" to secure the server and then change username & password after testing.
2) Right Click phpsql_genkml.php & phpsql_genkml3.php Save As to c:\wamp\www\test
Navigate to c:\wamp\www\test and make sure the files have .php and not .txt extensions
3) View In Google Earth
Open GEarth > Select Add Pulldown Menu > Select Add NetLink
For Link Box Use
http://localhost/test/phpsql_genkml3.php
set Apache 2.2.8 or 2.0.63 / set PHP 4.4.7 or PHP5 5.2.5
http://localhost/test/phpsql_genkml.php
set Apache 2.0.63 / set PHP5 5.2.5
For In-depth information Read: "Using PHP and MySQL to create KML" by Mano Marks http://code.google.com/support/bin/answer.py?answer=69906
An introduction to
setting up a Apache WebServer, using phpMyAdmin, connecting to a MS_Access or
MySql database
to display attributes in GEarth and Gmaps, GEarth API, etc
Using PHP and MySQL to Create KML
Set your Apache Server for ArcMap Geodatabase
Zip File Contents and Explination of Scripts (includes GEarth API)
Create MySQL DB from Exported Data of the ArcMap GeoDatabase
Add Polygons From ArcMap to MySQL DB