艺术创意

如何才能让更多的阅读者点击你的google广告呢?一般来访的阅览者是不会主动的点击google广告的,通常点击者是通过搜索引擎来的,google 广告的关键词匹配,导致阅览者会被动的点击google的广告而给博客主带来收益,虽然不建议博客主以广告的收入为生,但是能有一部分资金来维持自己的 blog,也完全没有坏处。这里介绍一个方法,让你的google广告仅显示给从搜索引擎来到你网站的。

打开你主题下的functions.php文件 在任意位置加入下列代码
[sourcecode language='php']
function scratch99_fromasearchengine(){
$ref = $_SERVER['HTTP_REFERER'];
$SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.');
foreach ($SE as $source) {
if (strpos($ref,$source)!==false) return true;
}
return false;
}[/sourcecode]
添加完毕后,在你想要显示google广告的位置,添加下列代码
[sourcecode language='php']
if (function_exists('scratch99_fromasearchengine')) {
if (scratch99_fromasearchengine()) {
INSERT YOUR CODE HERE
}
}[/sourcecode]

本文永久链接地址:http://www.dvpoo.com/display-adsense-search-engines-visitors-only/

本站所有内容版权均归本站所有,请转载注明文章出处,尊重本网站的版权信息

分享按钮
上一篇:
下一篇:

无觅相关文章插件,快速提升流量

Top Chat Bottom