How to retrieve Public IP Address
-
I'm currently working on a program that outputs the information given under ipconfig/all in DOS to a text file. Now even though this seems very simple do check normally, its for people who don't know dos commands and that sort of thing. However to make this program more effective I would like to have it output the Public IP address of a network, this can be done normally by visiting http://whatismyip.com The code is currently:
#include #include #include int main()
{
system("ipconfig/all >> \"C:\\Documents and Settings\\gamefreak\\desktop\\test.txt\"");
}which is working, now I'm trying to output the information provided by http://www.whatismyip.com/automation/n09230945.asp I suppose an answer on how to copy and paste all the information from a webpage in C++ would work the easiest.
-
I'm currently working on a program that outputs the information given under ipconfig/all in DOS to a text file. Now even though this seems very simple do check normally, its for people who don't know dos commands and that sort of thing. However to make this program more effective I would like to have it output the Public IP address of a network, this can be done normally by visiting http://whatismyip.com The code is currently:
#include #include #include int main()
{
system("ipconfig/all >> \"C:\\Documents and Settings\\gamefreak\\desktop\\test.txt\"");
}which is working, now I'm trying to output the information provided by http://www.whatismyip.com/automation/n09230945.asp I suppose an answer on how to copy and paste all the information from a webpage in C++ would work the easiest.
Have you tried
InternetReadFile()
? I just tried and it seemed to work fine."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Have you tried
InternetReadFile()
? I just tried and it seemed to work fine."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
No I have not tried InternetReadFile(), I looked into to it and I can't seem to get it to work.. I'm not very good when it comes to Win API functions