This project parses a properly-formatted '.kml' file in PHP. By properly formatted, I mean that as of the day of publishing it works with a straight-exported KML file downloaded from the Location History tool.