Could some one tell me how to use gethostbyname() to convert the string entered by user into corresponding ip.If some one could show it by demonstrating a code that would be great.The user should get an option to enter the name of the site say and the corresponding ip is shown and in case the user enters the ip it is converted in the site name.Thanks