MFC Internet Functions & PROXY!
Hi, I've been using the CInternet functions that come with MFC very successfully to download html files from the web. Once I have an internetSession for example I can use CGetHtml (or whatever it's called) to download html files, and it works fine. However, people who are behind firewalls and go through proxy's are having a lot of trouble with my programs. They don't work there anymore. How can I consider proxy's in my code?
You can email me here: [email protected]
---
Jawed Karim
Re: MFC Internet Functions & PROXY!
Here is a code fragment from my code that does what you want. cProxy is a CString that specifies the proxy server.
if(!cUseProxy)
{
session = new CInternetSession("****Client", 1,
INTERNET_OPEN_TYPE_DIRECT);
}
else
{
session = new CInternetSession("****Client", 1,
INTERNET_OPEN_TYPE_PROXY,cProxy);
}
Re: MFC Internet Functions & PROXY!
Check out the constructor documentation of CInternetSession. The solution will be pretty obvious then.