use RegEx matching in PHP proxy
improve invalid KML file checking