七月信仰志
我们需要一个信仰,一个神!
博客园
首页
博问
闪存
新随笔
联系
订阅
管理
随笔-17 文章-58 评论-89
2004年9月4日
Some Client Script
client vbscript:
Function
postXMLData(PostData,targetUrl)
Dim
oXml,oData,oUrl
Set
oXml
=
CreateObject
(
"
Microsoft.XMLHTTP
"
)
oData
=
PostData
oUrl
=
targetUrl
oXml.Open(
"
post
"
,oUrl,
false)
oXml.setrequestheader(
"
content-length
"
,
len
(oData))
oXml.setrequestheader(
"
content-type
"
,
"
application/x-www-form-urlencoded")
oXml.send(oData)
postXMLData
=
oXML.responseText
End Function
Function
URLEncoding(vstrIn)
Dim
strReturn,ThisChr,innerCode,Hight8,Low8
strReturn
=
"
"
For
i
=
1
To
Len
(vstrIn)
ThisChr
=
Mid
(vStrIn,i,
1
)
If
Abs
(
Asc
(ThisChr))
<
&
HFF
Then
strReturn
=
strReturn
&
ThisChr
Else
innerCode
=
Asc
(ThisChr)
If
innerCode
<
0
Then
innerCode
=
innerCode
+
&
H10000
End
If
Hight8
=
(innerCode
And
&
HFF00)
&
HFF
Low8
=
innerCode
And
&
HFF
strReturn
=
strReturn
&
"
%
"
&
Hex
(Hight8)
&
"
%
"
&
Hex
(Low8)
End
If
Next
URLEncoding
=
strReturn
End Function
Function
bytes2BSTR(vIn)
Dim
strReturn,ThisCharCode,NextCharCode
strReturn
=
"
"
For
i
=
1
To
LenB(vIn)
ThisCharCode
=
AscB(MidB(vIn,i,
1
))
If
ThisCharCode
<
&
H80
Then
strReturn
=
strReturn
&
Chr
(ThisCharCode)
Else
NextCharCode
=
AscB(MidB(vIn,i
+
1
,
1
))
strReturn
=
strReturn
&
Chr
(
CLng
(ThisCharCode)
*
&
H100
+
CInt
(NextCharCode))
i
=
i
+
1
End
If
Next
bytes2BSTR
=
strReturn
End Function
posted @ 2004-09-04 18:31 aijoe 阅读(1281) 评论(4)
编辑
公告
msn:aiyao@live.com
email:5454129@qq.com
qq:5454129
文章所有有关作者信息邮件改为:5454129@qq.com
昵称:
aijoe
园龄:
7年11个月
粉丝:
6
关注:
6
搜索
我的标签
HttpWebRequest
(1)
HtmlAgilityPack
(1)
XPath
(1)
多线程
(1)
域名查询
(1)
随笔档案
(17)
2009年9月 (1)
2008年7月 (1)
2007年4月 (4)
2007年2月 (2)
2006年3月 (2)
2006年2月 (1)
2005年7月 (1)
2005年5月 (1)
2004年12月 (1)
2004年10月 (1)
2004年9月 (1)
2004年6月 (1)
文章档案
(54)
2006年4月 (1)
2005年4月 (1)
2005年1月 (1)
2004年10月 (4)
2004年6月 (47)
Links
DotNET控件和组件开发
(rss)
Lutz Roeder's Programming.Net
msdn china
(rss)
msdn library
PowerWord Online
zzy2740
(rss)
积分与排名
积分 - 55230
排名 - 1911