hi,
I wanted to add my site a site map to incerease its SEO, however I have some problems. When I first submited it to the google, it said everything is fine, but later, I guess when it tried to index the urls in it, it gave an error saying that this file type unsupported, can you please check it for me, if there is some errors with it that you can see.
This is link to the sitemap → http://www.zipporesimleri.com/index.php/zippo/site_map
This is the function I wrote to generate it:
function site_map(){
$newline="
";
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" . $newline;
echo "<urlset xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">" . $newline;
echo "<url>" . $newline;
echo "<loc>" . base_url() ."</loc>" . $newline;
$timestamp = $this->zippo_model->last_update();
$date_time = explode(" ",$timestamp);
echo "<lastmod>" . $date_time[0] ."T".$date_time[1]."+02:00</lastmod>" . $newline;
echo "<changefreq>daily</changefreq>" . $newline;
echo "<priority>1.0</priority>" . $newline;
echo "</url>" . $newline;
foreach($this->zippo_model->get() as $zippo){
echo "<url>" . $newline;
echo "<loc>" . site_url("resimler/" . $zippo->id . "--" . preg_replace('/\s/', '_', $zippo->isim)) ."</loc>" . $newline;
$timestamp = $this->zippo_model->last_update();
$date_time = explode(" ",$timestamp);
echo "<lastmod>" . $date_time[0] ."T".$date_time[1]."+02:00</lastmod>" . $newline;
echo "<changefreq>monthly</changefreq>" . $newline;
echo "<priority>0.9</priority>" . $newline;
echo "</url>" . $newline;
}
echo "</urlset>";
}
I just get an XML list with the error:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
I am no expert on XML. I use a HTML/XML editor at work that creates XML code for our equipment graphics AND if I try to view one of my graphics outside of the normal proprietary viewer our company makes, I get this same kind of error. Unfortunately, I don’t have an answer except to say that to normal Firefox, it does not work.
Thank You,
I believe that this is not an error, instead it is a warning that tells about xml page is not related to any css file to be styled so that it is styled to look likr tree view in firefox. I don’t think that might be related to my problem. Do you think it might?
So, when you go to this link, what do you expect to get? I am surely not the expert on this except I thought it odd to look like the same thing I get with my work files.
Thank You,
What I expect is actually what I see right now, but there is somethig wrong with it appreantly, so I am trying to find out what it is.
Increase Google rank for this site (and sell more lighters?) Anyway if it’s not the intention, it will be the result, as they are already 3 links to this site in your other thread Search Engine Question. Looks like you’re learning quick how to use Google search engine.
Thanks, I think I am a quick learner, but I still can’t figure out what is the problem with my xml file. I think I am setting correct headers with my php function. And xml document seemed to well constructed to me. I am worried about that, my web server was down when google tried to connect site map, if that is the case about hte error, I will be working about this in vain for hours.
(and sell more lighters?)
Not for the moment, my friend whom I am helping to make a website aims to get popularity for site first, and then start to do some e-commerce 
I am now trying to write its contents to a static file, instead of directly outputting from php file, maybe it makes some difference 
http://www.zipporesimleri.com/site_map.xml
Neither could tidy -xml. There is no error in that file … at least no syntax error. But you can validate your sitemap using an online sitemap validator. You’ll find one within 10 seconds.