Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

May you let me know how to retrieve ip address from url in socket programming?

"I want to give the URL address and then find the IP address to be able to connect to it and get the body and header info of the webpage in a text file."

Many Thanks in advanced for your quick reply.
Posted

1 solution

 
Share this answer
 
Comments
85223501 28-Nov-12 6:44am    
Thanks and now I have to try to use it! :)
Richard MacCutchan 28-Nov-12 7:18am    
It's fairly straightforward, just a matter of parsing the hostname portion out of the url (I think there may even be a function for that), and then setting up your socket connection from that information.
Richard MacCutchan 28-Nov-12 12:57pm    
Sorry, no, I don't do personal coaching or consulting.
85223501 28-Nov-12 13:04pm    
Thanks and sorry for the big request. Many thanks.
Richard MacCutchan 28-Nov-12 13:35pm    
No problem. Sometimes I wish I had the time (and the skills) to do it - I could make some money.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900