title: PHP Dynamically creating KML for multiple placemarks on map
body: <p>Currently struggling with PHP and creating KML from it. I'm using the last.fm API (geoGetevents) to grab events from 'location' (for  example, user searches for Manchester) and then (using KML - as I feel more comfortable with it than JS) plot these on a map.</p>
  
  <p>I'm finding that I get invalid KML/KMZ errors when linking to a google map from my feed. Having said that, I know why.. Everything is contained in one file - including the KML that PHP generates. </p>
  
  <p>So with GET variable, the URL is <a href="http://example.net/dmp/search.php?city=bristol" rel="nofollow">http://example.net/dmp/search.php?city=bristol</a></p>
  
  <p>Google Maps is ignoring the rest of the URL after the '?' - is there any way I can send the dynamically generated KML to google maps? Maybe creating a separate KML file?</p>
  
  <pre><code>&lt;kml xmlns="http://www.opengis.net/kml/2.2"&gt; &lt;!-- Sets KML header --&gt; 
  &lt;Folder&gt; 
  &lt;name&gt;Gigs&lt;/name&gt; 
        &lt;Placemark&gt;&lt;name&gt;As I Lay Dying&lt;/name&gt;&lt;description&gt; etc
  </code></pre>
  
  <p>That is the current KML that is created by the PHP.</p>
  
  <p>Hope you can help, and thank you in advance</p>