标签为 google 的存档
制作网站的网站地图sitemap.xml
Author: robay16 九 2007
想要做广告得到更好的宣传,不外乎自己到搜索引擎里主动添加,但搜索引擎也可以自动的更新你的网站内容,那就是通过你的网站地图,今天又学到了点新东西,贴上来分享下:
网站地图的制作,就是在站点的根目下建立一个sitemap.xml文件,该文件概要描述你网站的主要文件结构.
制作sitemap.xml文件的目的就在于:便于各大搜索引擎收录你网站的网页到他们的数据库,以建立索引,供别人搜索时搜到你的站点,这样,收录的越多,你的访问人数也多了,这样其它的就不成问题了.
sitemap.xml文件用XML扩展标记语言来表述你的网站结构,这种文件对用户不可见,只是对于搜索引擎的爬虫而言的,它们认识这种文件,知道该去哪里来收录你的网站文件.
给你一个例子,一看就知道如何去做,稍微改造一下就可:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"><url>
<loc>http://www.a-boss.com/blog/article.asp?id=90</loc>
<lastmod>2007-09-16</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url><url>
<loc>http://www.a-boss.com/blog/article.asp?id=89</loc>
<lastmod>2007-09-16</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url><url>
<loc>http://www.a-boss.com/blog/article.asp?id=88</loc>
<lastmod>2007-09-16</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url><url>
<loc>http://www.a-boss.com/blog/article.asp?id=87</loc>
<lastmod>2007-09-15</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url></urlset>
其中:<loc></loc>标记中间就是你网站的各个目录以及目录下的文件
<lastmod></lastmod>标记中间是你修改此文件的最近更新日期
<changedfreq></changedfreq>标记中间是你网站的更新频率如daily,monthly等等
<priority></priority>标记中间是你对此网页或此目录的权重,也就是采集的优先级别,一般为0.1到1.0之间
开机时svchost.exe占用大量资源的问题
Author: robay16 九 2007
这个问题已经困扰了很长时间了,一直没有着手去解决,今天加完班,抽时间仔细检查了下,在开机的时候打开任务管理器,发现是一个SYSTEM用户名的svchost.exe进程在开机的时候连续长时间的占用CPU(大约一分钟)资源。于是运行Process Explorer查看该svchost.exe进程的线程,其中一个ntdll.dll!rtlallocateheap+0x18c线程占用了99%的CPU资源,系统几乎拖不动了,而且在恢复正常以后还会时常占用99%的CPU资源。
于是baidu了一下这个ntdll.dll!rtlallocateheap+0x18c什么结果都没有返回,鄙视一下baidu。转到google搜索,找到了一些英文社区,其中大部分都是讨论在打开windows update页面的时候这个svchost.exe的线程会占用大量的CPU资源,导致系统运行缓慢。根据讨论的一些内容,基本上可以确认这个ntdll.dll!rtlallocateheap+0x18c的线程属于自动更新服务的一部分,于是运行services.msc找到自动个更新服务Automatic Updates将其禁用,开机就没有再出现过ntdll.dll!rtlallocateheap+0x18c线程占用大量CPU资源的问题,并且svchost.exe进程的内存占用率下降了约2/3,因此可以看出windows xp的自动更新所需要花费的资源是相当大的。
因为自动更新所下载的文件都是缓存在这个svchost.exe中的,因此随着自动更新的时间越长,这个进程所占用的内存资源越大(我曾经见过101MB的占用),直到更新完全下载完毕,并且安装完成,资源才会被释放。由于自动更新所需要的时间往往很长,在每次开机的时候自动更新会继续工作并且尝试连接到服务器进行断点续传,所以导致开机的时候svchost.exe
LBS修改-文章的后面添加两大搜索引擎!
Author: robay13 九 2007
打开article.asp文件,搜索到
<!– TB Spam –>
<script type=”text/javascript”>
var tb_url_text = “<%=theCache.settings["baseURL"]+”trackback.asp?id=”+theArticle.id%>&key=<%=func.HTMLEncode(theCache.settings["trackbackcode"])%>”;
</script>
<!– TB Spam –>
在其上一行插入下面的搜索代码:
<!– Search Google Start –>
<center>
<form method=”get” action=”http://www.google.cn/custom” target=”google_window”>
<tr><td nowrap=”nowrap” valign=”top” align=”left” height=”32″>
<img src=”http://www.google.com/logos/Logo_25wht.gif” border=”0″ alt=”Google Search” align=”middle”></img>
<input type=”text” name=”q” value=”<%=func.HTMLEncode(theArticle.title)%>” class=”text search-field” style=”width: 68%” /></input>
<input type=”submit” name=”sa” value=”<%=lang["search"]%>” class=”button” /></input>
<input type=”hidden” name=”client” value=”pub-9928792648942112″></input>
<input type=”hidden” name=”forid” value=”1″></input>
<input type=”hidden” name=”hl” value=”zh-CN”></input>
<input type=hidden value=UTF-8 name=ie></input>
<input type=hidden value=UTF-8 name=oe></input>
<input type=hidden value=zh-CN name=hl></input></form>
</td></tr>
</form>
</center>
<!– Search Google End –><!– Search Baidu Start –>
<div align=”center”>
<form action=”http://www.baidu.com/baidu” target=”_blank”>
<img src=”http://img.baidu.com/search/img/baidulogo_clarity_80_29.gif” border=”0″ alt=”Baidu Search” align=”middle”></img>
<input type=”text” name=”word” value=”<%=func.HTMLEncode(theArticle.title)%>” class=”text search-field” style=”width: 68%” /></input>
<input type=”submit” name=”sa” value=”<%=lang["search"]%>” class=”button” /></input>
<input type=hidden name=”tn” value=sale925></input>
<input type=hidden value=UTF-8 name=ie></input>
<input type=hidden value=UTF-8 name=oe></input>
<input type=hidden value=zh-CN name=hl></input></form>
</div>
<!– Search Baidu End –>
保存后就可以实现我现在使用的效果!
google ADsense设置代码
Author: robay13 九 2007
都说可以通过google adsense挣钱,不知道真假,估计与网站的浏览量或流量有关系吧,至少我目前还达不到这种规模,不过还是可以先装上用用,也方便自己找东西吗?贴子设成隐藏的,给自己留个备用参考,也省得别人说我给自己做广告。
1、google adsense 搜索模块(AdSense for Search)
在页面的适当位置放置下面的代码即可实现google搜索功能.
[code]
<!-- Search Google -->
<form method="get" action="http://www.google.com/custom" target="google_window">
<table >
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<input type="text" name="q" size="15" maxlength="255" value="www.sale925.cn" ></input>
<input type="submit" name="sa" value="Google" class="button" ></input>
<input type="hidden" name="client" value="pub-9928792648942112"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="channel" value="1752202669"></input>
<input type="hidden" name="ie" value="GB2312"></input>
<input type="hidden" name="oe" value="GB2312"></input>
<input type="hidden" name="cof" ></input>
<input type="hidden" name="hl" value="zh-CN"></input>
</td></tr></table>
</form>
<!-- Search Google -->
[/code]
2、google adsense的页面广告功能( AdSense for Content)
在你想加入广告的页面位置处放置下面的代码即可实现google广告功能.本广告的显示大小为468*60的格式。
[code]<script type="text/javascript"><!--
google_ad_client = "pub-9928792648942112";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
google_ad_channel = "";
google_ui_features = "rc:10";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
[/code]