http files

Started by
13 comments, last by michael879 17 years, 6 months ago
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?
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/
do unto others... and then run like hell.
I dont see anything relevant on that page
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.
ok well I downloaded the libwww thing but I couldnt even get it to work, Ill check out that other link thx
Languages like PERL, or preconfigured libraries like .NET's WebRequest might be more adapted to the task.
Id rather use C++ since Im used to it. Im dling curl, it looks pretty simple thanks.
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
Patrick
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?
ok also, when I got blocked from firefox I could still access the webpage from internet explorer.

This topic is closed to new replies.

Advertisement