Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

whois search

Status
Not open for further replies.

doctor2001

IS-IT--Management
Oct 21, 2001
71
CA
Hi -

I am adding a whois search to my website with the following code:

Dim tcpc As New TCPClient
tcpc.Connect("whois.networksolutions.com", 43)
Dim strDomain As [String] = txtDomain.Text + ControlChars.Cr + ControlChars.Lf
Dim arrDomain As [Byte]() = Encoding.ASCII.GetBytes(strDomain.ToCharArray())
Dim s As Stream = tcpc.GetStream()
s.Write(arrDomain, 0, strDomain.Length)
Dim sr As New StreamReader(tcpc.GetStream(), Encoding.ASCII)
While -1 <> sr.Peek()
txtResults.Text = CType(sr.ReadToEnd, String)

End While
tcpc.Close()

___________________________________________________________

This works fine...but all i really want to do is return a value (true or false) to see if the domain is avalible to register or not. I really don't need the owner, address, etc.

Does anyone know how this can be accomplished?

Thanks -John


 
Can't you just return a value of True if the owner is populated?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
What I meant, was that you are currently returning all of the user's information if the domain exists (if understand you correctly). Therefore, if you check if there is some text associated with the owner, then you could return True (or False depending on how you look at it!).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top