fieldset> legend>strong>身份证号码查询/strong>/legend> div> % Dim identityNumber identityNumber = Trim(Request.Form("identityNumber")) %> div style="padding-left:23px;margin-bottom:8px;"> form name="identityForm" method="post" action="searcher.asp?sType=identity" onsubmit="return checkIdentityForm()"> 15或18位身份证号:input type="text" name="identityNumber" value="%=identityNumber%>" /> input type="submit" value="提 交" /> /form> /div> % IF(sType = "identity" AND identityNumber>"")THEN Dim ArrayIDCardInfo PostStr = "action=idcarduserid="identityNumber getContent=GetURL("http://www.oicq88.com/idsearch/index.asp",PostStr) getContent=RegExpText(getContent,":/font>((.|\n)*?)BR>") Response.Write("UL>") IF(getContent="")THEN Response.Write("li>身份证号码错误或没有查询到相关数据/li>") ELSE ArrayIDCardInfo = split(getContent,",") Response.Write("li>strong>性nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;别:/strong>font color=""#008000"">strong>"Replace(ArrayIDCardInfo(0),",","")"/strong>/font>/li>") Response.Write("li>strong>出生日期:/strong>font color=""#008000"">strong>"Replace(ArrayIDCardInfo(1),",","")"/strong>/font>/li>") Response.Write("li>strong>发证地区:/strong>font color=""#008000"">strong>"Replace(ArrayIDCardInfo(2),",","")"/strong>/font>/li>") END IF Response.Write("/UL>") END IF %> div style="padding-left:23px;margin-bottom:8px;"> form name="identityUpForm" method="post" action="searcher.asp?sType=upIdentity" onsubmit="return checkIdentityUpForm()"> 15位号码升至18位:input type="text" name="identityNumber" value="%=identityNumber%>" /> input type="submit" value="提 交" /> /form> /div> % IF(sType = "upIdentity" AND identityNumber>"")THEN PostStr = "action=upto18userid="identityNumber getContent=GetURL("http://www.oicq88.com/idsearch/index.asp",PostStr) getContent=RegExpText(getContent,"升位后号码:((.|\n)*?)/TD>") Response.Write("UL>") IF(getContent="")THEN Response.Write("li>身份证号码错误或没有查询到相关数据/li>") ELSE Response.Write("li>strong>升位(18位)后号码是:/strong>font color=""#008000"">strong>"Replace(getContent,",","")"/strong>/font>/li>") END IF Response.Write("/UL>") END IF %> /div> /fieldset>
div style="padding:15px;text-align:center;"> DESIGNED BY a href="goaler ' target=_blank rel=nofollow>http://www.goalercn.com" target=" ... R/a>BR /> /div>
/body> /html> % Function ByteToStr(vIn) Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,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 ByteToStr = strReturn End Function
Function GetURL(url,PostStr) Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP") With Retrieval .Open "POST", url, false ,"" ,"" .setRequestHeader "Content-Type","application/x-www-form-urlencoded" .Send(PostStr) GetURL = .ResponseBody End With Set Retrieval = Nothing GetURL=ByteToStr(GetURL) End Function
Function RegExpText(strng,regStr) Dim regEx,Match,Matches,RetStr Set regEx = New RegExp regEx.Pattern = regStr regEx.IgnoreCase = True regEx.Global = True Set Matches = regEx.Execute(strng) For Each Match in Matches RetStr = RetStr regEx.Replace(Match.Value,"$1") "," Next RegExpText = RetStr set regEx=nothing End Function %>