<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>鱼常游而忘飞 &#187; ASP</title>
	<atom:link href="http://www.oulan.com/w/tag/asp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oulan.com/w</link>
	<description>+++仿佛轻云应笑我--相携水岸弄朝霞--此生只为听天籁--坐拥书城看落花+++</description>
	<lastBuildDate>Fri, 23 Jul 2010 02:41:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>用AJAX跟踪Google Adsense广告点击</title>
		<link>http://www.oulan.com/w/2009/07/19/ajax-google-adsense/</link>
		<comments>http://www.oulan.com/w/2009/07/19/ajax-google-adsense/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 12:58:07 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[关注]]></category>
		<category><![CDATA[技巧]]></category>
		<category><![CDATA[adsense]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=461</guid>
		<description><![CDATA[功能

可以完整详细地获得每一个用户点击广告的数据。包括点击时间，用户的IP，页面来源地址，被点击的广告网站地址，如果你的站点上保存了用户cookie的话，甚至可以查询到是哪位用户点了你的广告
用纯客户端javascript代码和AJAX技术实现点击监听和向服务端发送点击数据，服务端我用的是ASP脚本，只是用来保存点击数据和提供浏览器端的点击查询，可以更换为其他服务端脚本，如PHP，JSP等
数据保存方式为了简单，我用纯text文本保存，一行保存一条数据，数据字段用逗号分隔，这样方便用户将这个文本另存为csv格式，csv就能用excel打开了。
查看广告点击数据可设访问密码

http://www.duduwolf.com/post/google_adsense_click_logger.asp
]]></description>
			<content:encoded><![CDATA[<h3 style="color: #000000; font-size: 13px; padding: 0px; margin: 0px;">功能</h3>
<ol>
<li style="padding: 0px; margin: 0px;">可以完整详细地获得每一个用户点击广告的数据。包括<strong>点击时间</strong>，<strong>用户的IP</strong>，<strong>页面来源地址</strong>，<strong>被点击的广告网站地址</strong>，如果你的站点上保存了用户cookie的话，甚至可以查询到是<strong>哪位用户点了你的广告<img style="clear: both; float: none; padding: 8px; border: 0px initial initial;" src="http://www.duduwolf.com/FCKeditor/editor/images/smiley/qq/face5.gif" alt="" align="absMiddle" /></strong></li>
<li style="padding: 0px; margin: 0px;">用纯客户端javascript代码和AJAX技术实现点击监听和向服务端发送点击数据，服务端我用的是ASP脚本，只是用来保存点击数据和提供浏览器端的点击查询，可以更换为其他服务端脚本，如PHP，JSP等</li>
<li style="padding: 0px; margin: 0px;">数据保存方式为了简单，我用纯text文本保存，一行保存一条数据，数据字段用逗号分隔，这样方便用户将这个文本另存为csv格式，csv就能用excel打开了。</li>
<li style="padding: 0px; margin: 0px;">查看广告点击数据可设访问密码</li>
</ol>
<p><a href="http://www.oulan.com/w/?cBamwj6d">http://www.duduwolf.com/post/google_adsense_click_logger.asp</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2009/07/19/ajax-google-adsense/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Godaddy主机ASP读写Cookie的方法</title>
		<link>http://www.oulan.com/w/2009/06/17/godday-asp-cookie/</link>
		<comments>http://www.oulan.com/w/2009/06/17/godday-asp-cookie/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 06:40:58 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[技巧]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[Cookie]]></category>
		<category><![CDATA[Godaddy]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=116</guid>
		<description><![CDATA[
Function BinaryToString(binData, CharSet)
Dim objStream
Dim strTmp
Const adTypeBinary = 1
Const adTypeText = 2
Const adModeReadWrite = 3
' init stream
Set objStream = Server.CreateObject("ADODB.Stream")
If CharSet&#60;&#62;"" Then
objStream.CharSet = CharSet
Else
Err.Raise vbObjectError + 1, "IllegalArgument", "Charset is required"
End If
objStream.Mode = adModeReadWrite
objStream.Type = adTypeBinary
objStream.Open
' write bytes into stream
objStream.Write binData
objStream.Flush
' rewind stream and read text
objStream.Position = 0
objStream.Type = adTypeText
strTmp = objStream.ReadText
' close up and return
objStream.Close
BinaryToString [...]]]></description>
			<content:encoded><![CDATA[<p><code lang="asp"><br />
Function BinaryToString(binData, CharSet)<br />
Dim objStream<br />
Dim strTmp<br />
Const adTypeBinary = 1<br />
Const adTypeText = 2<br />
Const adModeReadWrite = 3<br />
' init stream<br />
Set objStream = Server.CreateObject("ADODB.Stream")<br />
If CharSet&lt;&gt;"" Then<br />
objStream.CharSet = CharSet<br />
Else<br />
Err.Raise vbObjectError + 1, "IllegalArgument", "Charset is required"<br />
End If<br />
objStream.Mode = adModeReadWrite<br />
objStream.Type = adTypeBinary<br />
objStream.Open<br />
' write bytes into stream<br />
objStream.Write binData<br />
objStream.Flush<br />
' rewind stream and read text<br />
objStream.Position = 0<br />
objStream.Type = adTypeText<br />
strTmp = objStream.ReadText<br />
' close up and return<br />
objStream.Close<br />
BinaryToString = strTmp</p>
<p>Set objStream = Nothing<br />
End Function</p>
<p>Function convertCharSet(text, origCharset, newCharSet)<br />
Dim binaryData<br />
binaryData = StringToBinary(text, origCharset)<br />
convertCharSet = BinaryToString(binaryData, newCharSet)<br />
End Function</p>
<p>Function readCookies(cookie)<br />
Dim cookieValue<br />
cookieValue = Request.Cookies(cookie)<br />
if "" = cookieValue then<br />
readCookies = ""<br />
else<br />
readCookies = convertCharSet(cookieValue, "x-ansi", "utf-8")<br />
end if<br />
End Function</p>
<p>Function writeCookies(cookie, cookieValue)<br />
dim asciiString<br />
If cookieValue &lt;&gt; "" Then<br />
asciiString = convertCharSet(cookieValue, "utf-8", "x-ansi")<br />
Else<br />
asciiString = ""<br />
End If<br />
Response.Cookies(cookie) = asciiString<br />
If Request.ServerVariables("SERVER_NAME") = "你的主站" Then<br />
Response.Cookies(cookie).Path = "/"<br />
Else<br />
Response.Cookies(cookie).Path = ""<br />
End If<br />
Response.Cookies(cookie).Expires=Date+60 '自己设置时长<br />
writeCookies = asciiString<br />
End Function</p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2009/06/17/godday-asp-cookie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
