我们免费提供ASP/PHP/AJAX等各种版本的查询程序下载,请根据您的需要下载使用合适的版本。
function getWhoisInfo($domain){
$url="http://whois.nicenic.com/?domain=".$domain;
$contents =@file_get_contents($url);
$startPos="<pre>";
$endPos="</pre>";
$Pattern="($startPos).*($endPos)";
ereg($Pattern,$contents,$res);
$res= eregi_replace($endPos,"",$res[0]);
return $res;
}
function getWhoisInfo(domain)
set http=server.CreateObject("Microsoft.XMLHTTP")
whoisUrl="http://whois.nicenic.com/?domain="&domain
Err.Clear
http.Open "POST", whoisUrl, False
http.Send ""
if Err.Number = 0 Then
vIn=encode(http.responsebody)
getWhoisInfo="<pre>" & getstr(vIn,"<pre>","</pre>") & "</pre>"
End if
End Function
function getstr(content,bstr,estr)
pstart=instr(content,bstr)+len(bstr)
slen=instr(content,estr)-pstart
tmpstr=mid(content,pstart,slen)
tmpstr=replace(tmpstr,vbcrlf,"")
getstr=tmpstr
End Function
function encode(vIn)
dim strReturn,ThisCharCode,q,NextCharCode
strReturn = ""
For q = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,q,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,q+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode)*&H100 + CInt(NextCharCode))
q = q + 1
End If
Next
encode=strReturn
end Function