Fstream and HTTP
Is it possible for me to do the following:
ifstream fin;
fin.open("http://some_site.com/somefile.txt");
char buffer[2048];
fin.getline(buffer,2047);
and have ~2 KB of the web page stored in "buffer"?
If not, don''t give me an explanation of HOW to do it, please, I just want to know if it would work. Thank you.
==================
My (soon-to-be) Cherished Cookie of Appreciation:
-- MattB - for WinSock advice --
No,
codeka.com - Just click it.
fstream
s support only the local filesystem. Add to that the fact that getline
would only return the first line... If I had my way, I''d have all of you shot!
codeka.com - Just click it.
You can create your own C++ HTTPStream class, though doing so is far from trivial.
If you are using C# and .NET you can use the WebRequest and WebResponse classes to accomplish what you are looking for.
If you are using C# and .NET you can use the WebRequest and WebResponse classes to accomplish what you are looking for.
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
www.digitalfiends.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement