hi,
i am experiencing with PHP generated KML as well. for texting purposes i digitize points in Google Maps, send the result as a query string to a php file that translates this in KML. in Firefox anything works fine, but in MSIE 6 the file doesn't open in GE. note that i do not dump a file to the server in order to call it from there but i wriite it straight to the client.
i am doint this like that:
Code:
<?php
header("Pragma: public"); // required
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: application/vnd.google-earth.kml+xml kml; charset=utf8");
echo <<<EOD
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>some title</name>
<StyleMap id="MYGT_R
# ETC...
Firefox opens this directly in GE, MSIE recognizes this as XXXX.php and opens it in ... GoLive :-(
when i add another header line like
Code:
header("Content-disposition: attachment; filename=geotraceSample.kml");
all i get in MSIE is the XML code displayed. adding a trailing URL string like &MSIE=.kml doesn't help either. (mime-types on the server ar set.)
i saw that the
http://bbs.keyhole.com/ubb/download.php?Number=345 works fine, can someone point me to what's in there to make it work in MSIE?
thx, andr