C++/URL check
Expert: Prince M. Premnath - 8/23/2009
Question How are you?
I'm trying to write a program that, among other things, needs to validate a website. Basically I need to know if a user-entered website exists or not. I don't know where to start. I was wondering if you could give me a lead with this. How to do this using C/C++ Thank you so much!
AnswerHi dear Andres!
Am doing good!
Use the ping Command which is available in windows , if you got the response from the given hostname which means the site is valid!
use the following program for a sample.
http://p2p.wrox.com/c-programming/25941-ping-c.html
Use this for additional reference !
To query the DNS Server use the following resource.
http://support.microsoft.com/kb/831226
Hope it will help you !
Get back to me if you require more support.
Thanks and Regards!
Prince M. Premnath