金光 发表于 2005 年 5 月 12 日 20:25:20

[GG广告相关]Google Adsense公益广告的替代方法(含文件下载)

1.首先在网站所在空间里建立一个文件夹,名字随便取,比如google。

2.下载google_adsense_script.htm文件,这是Google Adsense在没有合适的广告时,会调用的用户文件,我把代码贴出来:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<script src="http://www.jgwy.net/google/top.js" type="text/javascript"></script>
</head>
<body style="background-color: transparent;">
</body>
</html>


3.调用的js文件,我命名为top.js:

document.write("<iframe src=http://www.jgwy.net/google/hosting.htm width=728 height=90 align=center frameborder=no border=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=no></iframe>")



这里我是用的iframe调用另一个htm文件(top_banner.htm),大家把它换成你自己的文件地址。
4.最关键的了,你自己的广告代码,写在top_banner.htm中:

<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<title></title>
<style type='text/css'>
<!--
body {
  margin-left: 0px;
  margin-top: 0px;
  margin-right: 0px;
  margin-bottom: 0px;
}
-->
</style>
</head>
<body>
<script type="text/javascript"><!--
google_ad_client = "pub-6092161935511264";
google_alternate_ad_url = "http://www.jgwy.net/google/google_adsense_script.htm";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="";
google_color_border = "6387C8";
google_color_bg = "F7F7F7";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
google_ad_type = "text";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</body>
</html>



5.把以上三个文件修改好后,放到你建立的文件夹中。这里要注意的是,Google Adsense不能跨域调用,比如,你有两个域名,指向不同的空间,那么,这两个空间中就都得放上这三个文件,不同共同调用一处的文件。

6.登陆Google Adsense,在“替代广告网址或颜色“一栏中填上你的google_adsense_script.htm文件路径,保存然后更新你的
google广告代码,把新代码贴到你的网页中,其实也就是多了这么一行。

PS:经咨询GG官方,这种替换方法是官方允许的:
http://jglt.net/forum.php?mod=viewthread&tid=100311

--------------------
您好!

非常感谢您发来电子邮件。

根据我们的检查,这样的展示广告的方式并没有违法我们的计划政策。不过,我们还是建议您将广告直接放入您需要展示广告的网页内,以取得最好的广告效果。

如果您还有任何其他问题或疑虑,请随时回复此电子邮件。

Google AdSense 小组敬上

Original Message Follows:
------------------------
From: "yamata" <yamata@126.com>
Subject: (SPAM: 10.28)
Date: Sun, 15 May 2005 16:08:28 +0800

Google AdSense,您好!

   我是google adsense加盟网站站长,我在网上发现一段代码,请问这样的代码是否违规?代码请参看链接


 http://jglt.net/forum.php?mod=viewthread&tid=99530&fpage=1

 致
礼!
          

 yamata
 yamata@126.com
   2005-05-15
-------------

不败的魔术师 发表于 2005 年 5 月 12 日 20:33:33

谢谢,老大,

九天 发表于 2005 年 5 月 12 日 20:36:50

先收,等GG肯收我了在用

屋顶上的轻骑兵 发表于 2005 年 5 月 12 日 20:41:35

老大亲自出马了。

一塌糊涂 发表于 2005 年 5 月 12 日 20:46:03

马上试!

热血青年 发表于 2005 年 5 月 18 日 13:58:46

关注

lovehoby 发表于 2005 年 5 月 21 日 14:54:11

不会用``但先下了``呵呵

那颗花生 发表于 2005 年 5 月 21 日 17:54:34

早在用了
看看
www.cnbeetle.com/bbs

阿威 发表于 2005 年 5 月 22 日 01:51:12

那是甚麽...不明白...

xinews 发表于 2005 年 5 月 22 日 11:06:04

多谢老大
页: [1] 2 3 4 5 6
查看完整版本: [GG广告相关]Google Adsense公益广告的替代方法(含文件下载)