Good job, cheers
Replyi have a web page with 2 submit buttons(next and Previous) and the form action attribute is set as "post".Then how can we identify the url of next or previous page.Also how can we access to the source html of this URL.
ReplyOriginally posted by: Shanmugam
Hi,
I want to connect to HTTPS password server to authenticate login&password and to get Cookie.
Using HttpQueryInfo to get Cookie data from the handle of HttpOpenRequest after calling
HttpSendRequest successfully. With the Cookie data, again I want to connect to the HTTPS web
sever to Upload a file.
The above whole concept is working fine in VC++ 6.0, Win2000 Prof. But, HttpQueryInfo fails
to get Cookie data when I use the same code for Pocket PC 2002 with Windows CE and eVC++ 3.0.
Even if HttpQueryInfo succeeds, it is not retrieving the proper Cookie data.
I want to know whether Windows CE & Pocket PC 2000 supports HttpQueryInfo API. If it supports,
Pls let me know the proper code.
Pls help me.
Thanks and Regards,
Shan ( shanpalaniram@rediffmail.com )
Originally posted by: znakeeye
I have a simple question. How can you download a web page containing non-english characters without getting garbage text?
I have a web page containing the letters '�', '�', and '�' and also the acute accent '�'. The accent looks like "´" when it is received in the buffer. WHY? The same goes for the Swedish letters above.
Please, anyone! This is driving me nuts!
/Chris
ReplyOriginally posted by: alan
How would you find or extract something from PageContent?
I noticet that if the URL source is very large CString::Find("text") doesn't work. It returns -1. Is this because PageContent doesn't hold large pages?
ReplyOriginally posted by: idrees
InternetWriteFile doesn't work and gives ERROR_INTERNET_INCORRECT_HANDLE_STATE error. I want to PUT data. HttpSendRequest(hHttpRequest, NULL, NULL, "Header", 6) works & write the word Header in the uploaded file but InternetWriteFile doesn't work. If any body can give a simple or modify my code so that it'll work. Following it the code.
//////code starts
void MyhttpSendRequestWrite(HWND hwnd){
HINTERNET hInternetSession, hURL, hConnect, hHttpRequest;
char buff[3000] = "This is the uploaded file";
DWORD bytesWritten = 10, dwContext, err;
hInternetSession = InternetOpen("Microsoft Internet Explorer",INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, INTERNET_FLAG_ASYNC);
hConnect = InternetConnect(hInternetSession,"localhost", INTERNET_DEFAULT_HTTP_PORT,"idrees", NULL, INTERNET_SERVICE_HTTP, 0, 0);
hHttpRequest = HttpOpenRequest(hConnect, "PUT", "pakistan/uploaded.txt", "1.1", "localhost", NULL, INTERNET_FLAG_HYPERLINK, dwContext); ///UltWeb/UltISAPI/ultISAPI.dll?default
if(!HttpSendRequest(hHttpRequest, NULL, NULL, "Header", 6)){
MessageBox(NULL,"HttpSendRequest Failed","http Failiur",MB_OK);
return;
}
short count=0;char tf, *errMsg;
DWORD total=0;
tf = InternetWriteFile(hHttpRequest, buff, sizeof(buff), &bytesWritten);
err = GetLastError();
errMsg = strerror(err);
if(err)
MessageBox(hwnd,errMsg,"Error",MB_OK);
//TextOut(hdc,0,0,str,wsprintf(str," %10ld bytes written ",total));
InternetCloseHandle(hInternetSession);
}
//////code ends
Reply
Originally posted by: Andy
I am looking at how to send binary data - perhaps using the POST method to send form data to a server. So far I've not actually managed to work out how to do it.
but ...
Originally posted by: Poonam Munshi
hi...
how can I use HttpQueryInfo method to retrieve response headers after posting a file using POST method for the HttpRequest ?
if i use the GET method then i can read response headers but cannot post files....so can anyone tell me how I can use HTTPQueryInfo and POST method together in my code to achieve both the things???
thanks
Poonam
Originally posted by: Mansoor Mohammed .S
I want to create an application which can be executed as service and this is restricted while using <b>WinInet</b>, Do u have a solution for this. Where can I get more info about it?
ReplyOriginally posted by: Marc TERRIER
I wish I could add a blue, underlined, hypertext link to
a Web page in the About box of an application I'm writing.
Does anyone know how I could do this ?