求不封IP,不限次数的域名注册API查询接口。附万网批量查询接口及源码!

huayy 2011-08-20 12:39:59
昨天晚上做了一套通过万网API查询域名的程序,但是每当查询100个左右的时候,就要换IP才能继续查询。
比较麻烦,求更好的API地址!

即“http://panda.www.net.cn/cgi-bin/check.cgi?area_domain=" & dname”
这样的地址,要不限查询次数的。

附WINFORM代码



Dim Td As System.Threading.Thread '定义一个线程
Dim n As Int32

Sub search()

Try
Dim tb As New Data.DataTable
tb = code.Data_DataTable("select a_ci,id from a_ci where a_class = '0' order by newid()").Tables(0)
Dim i As Integer
For i = 0 To tb.Rows.Count - 1

Dim c As String
Dim dname = tb.Rows.Item(i).Item("a_ci") & ".com"
Dim regurl = "http://panda.www.net.cn/cgi-bin/check.cgi?area_domain=" & dname
Dim reghtml As String = LoadURLData(regurl)

If GetKey(reghtml, "<returncode>", "</returncode>") <> "200" And GetKey(reghtml, "<original>", "</original>") <> "211 : Domain name is invalid" And GetKey(reghtml, "<original>", "</original>") <> "210 : Domain name is available" Then
c = "格式错误"
Else
If GetKey(reghtml, "<original>", "</original>") = "211 : Domain name is not available" Then
c = "已经注册"
ElseIf GetKey(reghtml, "<original>", "</original>") = "210 : Domain name is available" Then
c = "可以注册"
Else
c = GetKey(reghtml, "<original>", "</original>")
End If
End If

code.Data_update("update [a_ci] set a_class='" & c & "' where ID=" & tb.Rows.Item(i).Item("id"))

If c = "可以注册" Then
ListBox1.Items.Add(dname)
Dim q3 As Integer = Label3.Text
Label3.Text = q3 + 1
Else
Dim q2 As Integer = Label2.Text
Label2.Text = q2 + 1
End If

Dim q1 As Integer = Label1.Text
Label1.Text = q1 - 1

Next
Catch ex As Exception
ListBox1.Items.Add(ex.ToString)
End Try





End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Try
Label1.Text = code.Data_count("select count(id) from a_ci where a_class='0'")
Label2.Text = code.Data_count("select count(id) from a_ci where a_class='已经注册'")
Label3.Text = code.Data_count("select count(id) from a_ci where a_class='可以注册'")
Catch ex As Exception
ListBox1.Items.Add(ex.ToString)
End Try

End Sub


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Td = New System.Threading.Thread(AddressOf search) '实例化,指向abc过程
Td.Start() '开始运行线程
Catch ex As Exception
ListBox1.Items.Add(ex.ToString)
End Try
End Sub

Public Function LoadURLData(ByVal url As String) As String
Dim request As System.Net.HttpWebRequest = DirectCast(System.Net.HttpWebRequest.Create(url), System.Net.HttpWebRequest)
Dim response As System.Net.HttpWebResponse = DirectCast(request.GetResponse(), System.Net.HttpWebResponse)
Dim reader As New System.IO.StreamReader(response.GetResponseStream(), System.Text.Encoding.GetEncoding("gb2312"))
Return reader.ReadToEnd()
End Function


Function GetKey(ByVal HTML, ByVal Start, ByVal Last)
Dim body1 = Split(HTML, Start)
Dim body2 = Split(body1(1), Last)
GetKey = body2(0)
End Function


Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End

End Sub
End Class

...全文
468 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
huayy 2011-08-22
  • 打赏
  • 举报
回复
继续求方法
huayy 2011-08-21
  • 打赏
  • 举报
回复
继续求方法
huayy 2011-08-20
  • 打赏
  • 举报
回复
IP代理,用第三方软件倒是可以实现。
但是每次都要重新操作,太麻烦。

求winform换IP代码,或其他域名查询API接口。
csnd唐长老 2011-08-20
  • 打赏
  • 举报
回复
如果不是那就 需要用IP代理了
huayy 2011-08-20
  • 打赏
  • 举报
回复
我试试,貌似不是cookie
csnd唐长老 2011-08-20
  • 打赏
  • 举报
回复
如果是 Cookie 限制的 到100次清理Cookie 试试

110,502

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧