如何修改Text Link Ads代码

| 5 Comments | No TrackBacks
有网友问到如何修改Text Link Ads,以符合Google对链接买卖的要求,也就是避免PageRank的传递。
这里用PHP代码为例,通常从Text Link Ads后台取得的代码中有这么一段:
if ( is_array($arr_xml) ) {
		echo "\n<ul>\n";
		for ($i = 0; $i < count($arr_xml['URL']); $i++) {
			if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;
			echo "<li>".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>\n";
		}
		echo "</ul>";
	}
修改成下面这个样子:
 if ( is_array($arr_xml) ) {
echo "<div>";
echo "\n<ul>\n";
for ($i = 0; $i < count($arr_xml['URL']); $i++) {
if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;
echo "<li>".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\" rel=\"nofollow\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>\n";
}
echo "</ul>";
echo "</div>";
}
这样修改之后,就既可以通过买卖链接来获得收入,同时也满足Google及其他搜索引擎对于链接权值传递的要求。


作者: David Yin
原载: SEO 网站优化推广
版权所有。转载时必须以链接形式注明作者和及本声明。

请点击鲜果推荐,让更多的读者受益:

相关的文章

No TrackBacks

TrackBack URL: http://seo.g2soft.net/mt-cgi/mt-t-1102.cgi/1987

5 Replies

| Add a Reply

Leave a comment

关于

David Yin
研究(SEO)搜索引擎优化排名和(PPC)竞价排名技术,总结搜索营销学的各种方法和趋势。
– David Yin
Email:seo[AT]g2soft.net

About this Entry

This page contains a single entry by David Yin published on December 9, 2007 6:38 PM.

春天的樱花:WordPress免费模板 was the previous entry in this blog.

Agloco执行有问题 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.21-en

订阅SEO 网站优化推广