Is it possible to get IP address of the web sites which IE are browsing? I want to get the IP address in the program.Please show me some code, if possible. Thanks.
you can get url first in IE address bar,then call "gethostbyname" to get the IP addresses.
how to get url for IE? you can use IE com interface or use API findwindowEx. http://expert.csdn.net/Expert/topic/1338/1338542.xml?temp=.212414
Thanks, I cannot open the link: "http://www.csdn.net/develop/read_article.asp?id=8997"
just www.csdn.net is ok
if u wanna get a link like this http://www.csdn.net/develop/read_article.asp?id=8997u ought to resolve domain name and replace original link like this http://211.157.102.21/develop/read_article.asp?id=8997anyway, I don't know why u need it.Just host ip or not?socket? wininet? through proxy? confused....
http://expert.csdn.net/Expert/topic/1338/1338542.xml?temp=.212414
http://211.157.102.21/develop/read_article.asp?id=8997anyway, I don't know why u need it.Just host ip or not?socket? wininet? through proxy? confused....
in_addr hostaddr;
memcpy(hostaddr,pHost->h_addr,pHost->h_length);
char* pszIP = inet_ntoa(hostaddr);