ebchost Posted July 21, 2011 Share Posted July 21, 2011 I try to make dinamic site map for my web page this is the code: <?php include_once("....som link"); $sql = "SELECT * FROM rss_vesti"; $result = mysql_query($sql) or die(mysql_error()); echo '<?xml version="1.0" encoding="UTF-8"?>'."\n"; echo "<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">"; while($row = mysql_fetch_assoc($result)) { $id = $row['ID']; $datum = $row['DATUM']; ?> <url> <loc><?php echo "http://sportskevesti.co/index.php?opcija=vest&vest_id=$id"; ?></loc> <lastmod><?php echo $datum; ?></lastmod> <priority>0.50</priority> <changefreq>always</br></changefreq> </url> <?php } ?> </urlset> this is the resolt: http://sportskevesti.co/sitemap.php haiar i have comlete list of posible links, but google do not accespte this. What is wrong, how to correct ? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/242580-dinamic-sitemap/ Share on other sites More sharing options...
teynon Posted July 21, 2011 Share Posted July 21, 2011 Don't load that page. Will crash Chrome. You are outputting WAY to much there. Quote Link to comment https://forums.phpfreaks.com/topic/242580-dinamic-sitemap/#findComment-1245905 Share on other sites More sharing options...
ebchost Posted July 21, 2011 Author Share Posted July 21, 2011 Don't load that page. Will crash Chrome. You are outputting WAY to much there. yes, its lot of the record in database, around 10.000 bat Chrome work fine. I agree that is to mach of output data, i will make last 100 record for example, but is not my problem now, How to create XML map from this ? or i mast do somthing else ? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/242580-dinamic-sitemap/#findComment-1245912 Share on other sites More sharing options...
ebchost Posted July 21, 2011 Author Share Posted July 21, 2011 i put "LIMIT 100" option in MySQL query. Now is faster Quote Link to comment https://forums.phpfreaks.com/topic/242580-dinamic-sitemap/#findComment-1245917 Share on other sites More sharing options...
teynon Posted July 21, 2011 Share Posted July 21, 2011 I haven't worked with Google sitemaps in a while. Try reducing the number to something really small like 20 and see what it says. What is Google saying when you try to submit it? Quote Link to comment https://forums.phpfreaks.com/topic/242580-dinamic-sitemap/#findComment-1245924 Share on other sites More sharing options...
ebchost Posted July 21, 2011 Author Share Posted July 21, 2011 I haven't worked with Google sitemaps in a while. Try reducing the number to something really small like 20 and see what it says. What is Google saying when you try to submit it? In this moment: "Unsupported file format Your Sitemap does not appear to be in a supported format. Please ensure it meets our Sitemap guidelines and resubmit." FIle name: sitemap.php how to make xml ? is this good structure of sitemap ? (fore one day i have over 100 inputs in data base, i cann not show litl number of record in finall resolt) Quote Link to comment https://forums.phpfreaks.com/topic/242580-dinamic-sitemap/#findComment-1245928 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.