C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






IP resolution


Posted Date: 20 Jun 2008    Resource Type: Code Snippets    Category: Network

Posted By: shyamalendu prusty       Member Level: Silver
Rating:     Points: 5



This code sample consists of a function GetIP that gets the IP address of a domain. The function takes the domain as a String object and returns the IP as a String. This process is generally called IP resolution.


Public function GetIP(ByVal domain as String) as String

Try
Dim Ips As New Collection
Dim i As Integer
Dim ipEntry As Net.IPHostEntry = System.Net.Dns.GetHostEntry(domain)
Dim ipAddr() As Net.IPAddress = ipEntry.AddressList
For i = 0 To ipAddr.GetUpperBound(0)
Ips.Add(ipAddr(i).ToString)
Next
Dim AddressIP As String
return Ips(1).ToString()
Catch ex As Exception
return “Can not resolve the IP address”
End Try
end function




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Resolve IP address from Domain  .  IP resoution in VB  .  IP Resolution in Visual Basic  .  IP resolution  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to Get IP Address Of A Machine
Previous Resource: Check for internet connection
Return to Discussion Resource Index
Post New Resource
Category: Network


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

accuconference

Contact Us    Privacy Policy    Terms Of Use