-- 作者:admin
-- 发布时间:3/9/2005 12:05:00 AM
-- Google Adsense公益广告的替代方法(含文件下载)[转帖]
http://bbs.biz.163.com/article/-000A-KYkyPJ.html 2005-02-07 09:39:46 [URL=http://bbs.biz.163.com/-000A.html]KELVEN@-000A[/URL] [URL=http://bbs.biz.163.com/article/-000A-KYkyPJ.html]http://bbs.biz.163.com/article/-000A-KYkyPJ.html[/URL] 复制 [URL=http://bbs.biz.163.com/article/-000A-KYkyPJ.html#p]评论[/URL] Author: [URL=http://www.5iuu.com/member.asp?action=view&memID=2]callcall[/URL] | From: [URL=http://www.5iuu.com/blogview.asp?logID=758]Original[/URL] ] 1.首先在网站所在空间里建立一个文件夹,名字随便取,比如google。 2.下载google_adsense_script.htm文件,这是Google Adsense在没有合适的广告时,会调用的用户文件,我把代码贴出来: 引用内容: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL=http://www.w3.org/TR/xhtml1/DTD/xhtm]http://www.w3.org/TR/xhtml1/DTD/xhtm[/URL] ... l.dtd "> <html xmlns="[URL=http://www.w3.org/1999/xhtml%22]http://www.w3.org/1999/xhtml"[/URL] xml:la ... nbsp;lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> <script src="[URL=http://blog.insome.com/main/google/top.js%22]http://blog.insome.com/main/google/top.js"[/URL] type=&qu ... quot;></script> //这里你是调用的js文件地址 </head> <body style="background-color: transparent;"> </body> </html> 3.调用的js文件,我命名为top.js: 引用内容: document.write("<iframe src=http://blog.insome.com/main/google/top_banner.htm width=468 height=60 align= left 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>ad</title> <style type='text/css'> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> </head> <body> <script language="JavaScript" type="text/JavaScript" src="[URL=http://union.3721.com/ass/adv1_1.]http://union.3721.com/ass/adv1_1.[/URL] ... ome_122963"> </script> //这里是你自己的广告代码 </body> </html> 5.把以上三个文件修改好后,放到你建立的文件夹中。这里要注意的是,Google Adsense不能跨域调用,比如,你有两个域名,指向不同的空间,那么,这两个空间中就都得放上这三个文件,不同共同调用一处的文件。 6.登陆Google Adsense,在“替代广告网址或颜色“一栏中填上你的google_adsense_script.htm文件路径,保存然后更新你的 google广告代码,把新代码贴到你的网页中,其实也就是多了这么一行 [URL=http://bfziye.info/blog/attachments/month_0501/he7l_sphw_google.rar]下载源文件[/URL]
|