中文域名转码函数
Function punycode(byval strdomain) On error resume Next Dim cncurl,xmlobj CNCURL="http://www.cnnic.net.cn/cgi-bin/conv.cgi?code=puny&name=" & strdomain Set xmlobj=CreateObject("WinHttp.WinHttpRequest.5.1") xmlobj.setTimeouts 10000, 10000, 10000, 30000 xmlobj.open "GET",CNCURL,false xmlobj.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xmlobj.send retCode=xmlobj.ResponseText Set xmlobj=Nothing punycode=myinstr(retCode,":\s+([\w\.\-]+)\s*</pre") end Function function myinstr(byval mystring, byval regstr) Dim oReg,matches,match Set oReg = New RegExp oReg.Pattern=regstr:oreg.IgnoreCase=True Set matches=oReg.execute(mystring) For each match in matches myinstr=match.subMatches(0) Next Set oReg=nothing end function
上一篇: 关于注入漏洞的终级使用教程
下一篇: asp查询虚拟主机上的上传下载流量
目前这篇文章有27条评论(Rss)