使用php编写百度sitemap
来源:互联网 发布:淘宝店怎么医疗器械 编辑:程序博客网 时间:2024/04/30 00:34
public function pc() {// $table_name = get_sites_table_name($this->site['id']); $datas = get_site_data($this->site['id'], 1, 1000);//这里是获取http://www.renti199.com的站点内容 $datas = $datas['data']; echo("<?xml version=\"1.0\" encoding=\"utf-8\"?> "); echo('<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" 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">'); foreach ($datas as $k => $v) { $url = "http://".$this->site['domain'] . get_show_url($v); echo ' <url> <loc>' . $url . '</loc> <priority>0.5</priority> <lastmod>' . date("Y-m-d", time()) . '</lastmod> <changefreq>daily</changefreq> </url> '; } echo "</urlset>"; }
阅读全文
0 0
- 使用php编写百度sitemap
- 百度sitemap网站地图使用常见问题问答
- django支持动态百度sitemap
- 实现百度sitemap实时推送
- .Net生成站点sitemap供百度抓取的类和使用
- PHP生成网站sitemap.xml
- 利用百度的标准生成sitemap
- 向百度提交网站地图Sitemap
- 百度结构化数据插件 sitemap
- ***.sitemap
- SEO必修课之:Sitemap语法指南,如何使用sitemap.xml
- 使用zend编写php扩展
- 使用 php编写web service
- EditPlus编写PHP使用技巧
- sitemap.xml生成方法(asp和php)
- 向Google、Yahoo、百度等提交网站地图Sitemap
- 如何主动提交Sitemap,让谷歌、雅虎、百度、MSN统统收录
- gg(谷歌)和百度(baidu)sitemap For Discuz7.2
- 根据身份证获取年龄
- 11.09 学习心得
- android 侧滑回退 导航 模仿iOS的NavigationController
- 在pandas中,使用frame.drop_duplicates(['state'])去掉多属性数据中重复行
- cassandra 架构实现
- 使用php编写百度sitemap
- Hive工作笔记
- [喵咪KafKa(3)]PHP拓展See-KafKa
- 深入了解HashMap
- Webpack整合实例及优化
- Error merging: fatal: You have not concluded your merge (MERGE_HEAD exists).
- Android studio 删除所有断点
- python多进程笔记1
- [喵咪MQ(1)]RabbitMQ简单介绍准备工作