OK, new problem along same lines...
Code is supposed to pull a page into a buffer so that I can pull out the weblinks. Unfortunately the webpage is "sensing" that I don't have Java and isn't giving me the page with the links I need. Is there a way I can make it think that I have java so that the links show up?
Here is the code that calls the page:
Code:
// open HTTP connection and send request.
CInternetSession session;
CHttpConnection* pConnection = session.GetHttpConnection((LPCTSTR) sErver, (INTERNET_PORT) sPort);
CHttpFile* pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST,
LOGIN_RES,
NULL,
1,
NULL,
NULL,
reqFlags);
try{
pFile->SendRequest(strHeaders, (LPVOID)(LPCTSTR)strFormData, strFormData.GetLength());
int len = pFile->Read(respBuf, BUFSIZE);
respBuf[len] = '\0';
if (verbose) {
fprintf(stdout, "\nReceived Data from Server: \n\n");
fprintf(stdout, "\t%s\n", respBuf);
}
} catch (CInternetException *e) {
e->GetErrorMessage(respBuf, BUFSIZE);
fprintf(stderr, "Fatal Error in sending HTTP request...\n%s\n", respBuf);
retCode = FAILURE;
}
return retCode;
the output from the website is attached as a txt file.