Posted by Yippee | 评论(4) | 引用(0) | 阅读1697次
BoBlog的SiteMap.php Invalid date 乱修正
SiteMap Invalid date 今天再次提交了 SiteMap,结果仍然是 :http://www.shengfang.org/blog/sitemap.php Sitemap Index 7 hours ago 7 hours ago Invalid date Sitemap Errors Invalid date with Sitemap http://www.shengfang.org/blog/sitemap.php?cat=1 An invalid date was found. Please see How do I specify time? for more information before resubmitting. Q: How do I specify time? Use ISO 8601 encoding for the lastmod timestamps and all other dates and times in this protocol. For example, 2004-09-22T14:12:14+00:00. If you wish, you can omit the time portion of the ISO8601 format; for example, 2004-09-22 is also valid. However, if your site changes frequently, you are encouraged to include the time portion so crawlers have more complete information about your site. Q: How do I compute lastmod date? For static files, this is the actual file update date. You can use the UNIX date command to get this date: $ date --iso-8601=seconds -u -r /home/foo/www/bar.html >> 2004-10-26T08:56:39+00:00 For many dynamic URLs, you may be able to easily compute a lastmod date based on when the underlying data was changed or by using some approximation based on periodic updates (if applicable). Using even an approximate date or timestamp can help crawlers avoid crawling URLs that have not changed. This will reduce the bandwidth and CPU requirements for your Web servers. 看了半天,看不出什么道道,想想再作个试验,把SITEMAP.PHP里面的 function gettzdtime ($rawtime) { $p=date("Y-m-dTH:i:s", $rawtime); $tzd=date("O", $rawtime); $p.=substr($tzd, 0, 3).':'.substr($tzd, 3, 2); $p=str_replace('+08:00','+00:00',$p); //我觉得好像就是+0和+8的区别?试一试吧 return $p; } 居然成功了:http://www.shengfang.org/blog/sitemap.php Sitemap Index 5 hours ago 9 hours ago OK ago时间不对是因为我提交了好几次 :) 字体:大 中 小 |
2005年6月23日08:00星期四 [RAN乱]
en ...终于到"今天"了  sitemap终于被google认出来了:) 今天...在我一怒火下.....  把自己的rss2 feedburner atom统统加上去了..  恩..来句范伟的"谢谢啊~~~" | Yippee 回复于 2005年7月19日10:12 | | 呵呵,解决就好了 :)其实不用提交这么多,否则流量会增长太多的。 03:39 注意身体啊 |
http://www.2doit.net/blog/sitemap.php 替换完毕了...CST终于变成了可爱的T了... 可是..到 https://www.google.com/webmasters/sitemaps/stats?hl=en_US&msg=1 提交..依旧是Invalid date Sitemap: http://www.2doit.net/blog/sitemap.php Last Submitted Jul 18 Last Downloaded Jul 17 Format Sitemap Index Sitemap Errors Invalid date with Sitemap http://www.2doit.net/blog/sitemap.php?cat=1 An invalid date was found. Please see How do I specify time? for more information before resubmitting. 我恨google!!  | Yippee 回复于 2005年7月18日22:13 | | 少安毋躁,你显示的是18号提交的,而GOOGLE是17号下载的,也就是说这时还没有更新呢?明天再看看?正常应该显示 HOURS AGO 之类的。 一般提交完后需要几个小时GOOGLE才开始访问。其实你也可以先提交RSS啊。 |
......自己的php水平太菜了...弄了一个上午... function gettzdtime ($rawtime) { $t="T"; $p=date("Y-m-dH:i:s", $rawtime); $tzd=date("O", $rawtime); $p.=substr($tzd, 0, 3).':'.substr($tzd, 3, 2); $p=str_replace('+08:00','+00:00',$p); //我觉得好像就是+0和+8的区别?试一试吧 return $p; } 这样到是能把该死的CST去掉..可是却不知道怎么加上一个T....郁闷..还请指点一下..嘿嘿 | Yippee 回复于 2005年7月18日12:07 | | 奇怪,你知道substr($tzd, 0, 3).':',那么就先取前10个字节,再.'T',再.后面的时间?不过我写的话就干脆:$p=str_replace('CST','T',$p); 反正时间里面也没有字母的。我水平也很差的:) |
Sitemap: http://www.2doit.net/blog/sitemap.php Last Submitted Jul 17 Last Downloaded Jul 16 Format Sitemap Index Sitemap Errors Invalid date with Sitemap http://www.2doit.net/blog/sitemap.php?cat=1 An invalid date was found. Please see How do I specify time? for more information before resubmitting. « Return to My Sitemaps 这按照你的方法修改了...淘声依旧..唉 | Yippee 回复于 2005年7月18日08:51 | | 你直接访问你的SITEMAP.PHP,看看显示的内容是什么? <lastmod>2005-07-18CST01:49:10+00:00</lastmod> 你的,我的 <lastmod>2005-06-15T21:01:43+00:00</lastmod> ,你再改改语句,把CST替换为T试一试? 这个可能和PHP服务器时间设置有关。 |
|