Jump to content
  • Advertisement
Sign in to follow this  
michael879

http files

This topic is 4369 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

ok Im sure this is simple I just cant find anything on it. When I do a google search for http it comes up with nothing because every single page has http in it. There is a website Im trying to access from a program that has a database full of stuff. Its accessable by some url : https://www.blah.com/?gameCode=P4&number=1101171271 where number can vary. I am trying to collect a group of these numbers and save them to a file. However, ofstream doesnt work. Im guessing it doesnt support remote files. Does anyone know an easy way to do this?

Share this post


Link to post
Share on other sites
Advertisement
You probably want the w3's original RFC's (Request for Comments), they should describe the protocol fairly accurately :)

http://www.w3.org/Protocols/

Share this post


Link to post
Share on other sites
Quote:
Original post by michael879
I dont see anything relevant on that page


Then you didn't read it. It has the specifications of the HTTP protocol, which is what you'll have to use to talk to a web server.

If you don't want to be bothered with that, have a look at libcurl. The web server appears to be down at the moment though (or it's extremely slow). The Sourceforge page is here.

Share this post


Link to post
Share on other sites
To access files stored on a website you need to use TCP/IP (Winsock if you're using Windows) and HTTP. I would recommend you use the library since HTTPS means you need to be able to handle SSL (Secure Socket Layer) in your app. The Curl library appears to support it.

Good luck

Share this post


Link to post
Share on other sites
turns out the url works with http too. anyway, I got everything working perfectly. However, after a while it stopped working. Its as if the website blocked me or something. Instead of getting the html page I would get a short message saying its not availble. The weird part is that I can still access the page in firefox. Does anyone know what could cause this?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!