Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how works IWebBrowser2.Navigate?

Status
Not open for further replies.

ThinkingPrometheus

Programmer
Joined
Feb 17, 2005
Messages
1
Location
AT
hiho@ll

i try to auto login a website using the postdata i got from a form

my code:

CString url("
CString post("user=testuser&pwd=testpass&log=&login=Login");
CString header("Content-Type application/x-
COleVariant vPostData(post);
COleVariant vHeader(header);

BSTR str=::SysAllocString(T2OLE(url.GetBuffer()));

m_pWebBrowser->Navigate(str,COleVariant((long)0,VT_I4),
COleVariant("_SELF", VT_BSTR),vPostData,vHeader);

does anybody know why it doesn't work?
all i get is the login page, where i have to put username and pass and click the login button

but with the code above i should be in the member area!?

i traced the http connection with a http proxy and the browser doesn't send the post data and my header!?

Is there a failure in variable declaration?
whats wrong?

thx@ll
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top