#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    Tucson, Arizona, The States
    Posts
    73
    Rep Power
    14

    Accessing the Web C++


    How hard is it to access the web with C++? How can I do it?
    Basically I want to load a file from the web just as if it was a local computer file into my C++ program.

    Thank you much!
  2. #2
  3. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,184
    Rep Power
    2222
    I don't have your answer, but I do know that we need to know more.

    OS: Linux? Windows? OS X? Something else?

    Development platform:
    gcc? Visual C++? Borland C++Builder? Whatever the iMac uses? Dev-C++?

    Under Visual C++ & Win32, there are higher-level functions called WinInet, which wrapper functions in the Win32 API. There's also ISAPI. If you're doing Win32, that might be the direction you're wanting to go.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    Tucson, Arizona, The States
    Posts
    73
    Rep Power
    14
    Microsoft Visual Studio 6.0
    OS: Windows
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    Tucson, Arizona, The States
    Posts
    73
    Rep Power
    14
    I'm just making simple dos based programs etc. First year kind of stuff.
  8. #5
  9. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,184
    Rep Power
    2222
    Originally posted by Bozpw
    I'm just making simple dos based programs etc. First year kind of stuff.
    Under Win32, those "simple dos based programs" are console applications which still have access to the Win32 API and to the MFC. You can do multithreading, load and use DLLs, and also make use of MFC's WinInet wrappers, none of which you could have done just under DOS (ie, on pre-Win95 machines).

    As I mentioned, it looks to me -- who has never tried to do what you are wanting to do -- that WinInet and possibly even ISAPI are the keywords that you should research for an answer. If you have access to Kruglinski's "Inside Visual C++" or "Programming MicroSoft Visual C++ 5th Edition" (same book, next edition), then the sockets chapter covers WinInet and the IIS chapter covers ISAPI. For example, the IIS chapter talks about doing an HTTP GET, which is how you fetch a page from a web server.

IMN logo majestic logo threadwatch logo seochat tools logo