delphi 登陆网页问题
begin
PostDataStream := TStringStream.Create('');
postList := TStringList.Create;
postList.Add('&loginsubmit=1');
postList.Add('&cookietime=315360000');
postList.Add('&formhash=4cd69240');
postList.Add('&username=' + Edit1.Text + '&password=' + Edit2.Text);
URL := 'http://192.168.1.151:82/do.php?ac=5e88d16502799f5a6ea64cdc58a84dc7&&ref';
try
IdHTTP1.HandleRedirects := true;
IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
IdHTTP1.Request.Referer := URL;
IdHTTP1.Request.AcceptLanguage := 'zh-cn';
IdHTTP1.Request.Connection := 'Keep-Alive';
IdHTTP1.Post(URL, postList, PostDataStream);
except
IdHTTP1.Disconnect;
end;
showmessage(IdHTTP1.Response.RawHeaders.Text);
end;
这个就是我的登陆代码,目前登陆成功,我想实现类似ShellExecute那样调用浏览器打开登陆成功后的主页。
有人知道怎么做吗?
PostDataStream.datastring.返回的是脚本windows.location...