Jump to content
  • Advertisement
Sign in to follow this  
CProgrammer

online data

This topic is 5151 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I can easily load a text file from the hard drive(fopen in C). Now how do I load a text file from a web url like http://www.somedomain.com/sometext.txt ? -CProgrammer

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Well, you could do it in C via CGI if you want. Search for CGI programming with C or C++. OR, you could use Python, PHP, Perl, JSP, ASP.. etc etc.


Since you already now C, using CGI is probably the easiest route to take (assuming your server supports CGI). Opening a file via C using CGI is the same as opening a file with just C.


Share this post


Link to post
Share on other sites
Thanks for the swift reply.
Well I already know some cgi programming but I dont want a server spplication. I want to make a noral windows application which uses the internet connection present to load the file.

-CProgrammer

Share this post


Link to post
Share on other sites
That would require you to write a socket layer in your application. The layer needs to open a connection on port 80 to the webserver and post a HTTP GET request to get the file/page from the server.

Toolmaker

Share this post


Link to post
Share on other sites
Wow, thats short for something like getting a file off the web?
Ok maybe some kind of free library? or can WinSock do this if so anyone have a tutorial?
Basically I want to be able to load any file in binary and text mode. Just like C File I/O.

-CProgrammer

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!