var
strMsg:string;
sParams: TStringStream;
begin
sParams := TStringStream.create('');
IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
try
sParams.WriteString('参数1=结果&参数2=结果2') ;
strMsg:=IdHTTP1.post('http://www.xxxxx.com/add-c.asp',sParams) ;
memo1.Text:=strmsg;
finally
sParams.Free ;
end;
s := 'http://aaa.net/bbs/index.php';
if CanGetIECookie(s, str) then
begin
CookieStr := 'Cookie: ' str;
idHttp1.Request.CustomHeaders.Text := CookieStr;
end else
begin
ShowMessage('没有发现本地Cookie,请从Web页面登陆一次。');
Exit;
end;
s := 'http://aaa.net/bbs/forumdisplay.php';
PostData := TStringList.Create;
PostData.Add('fid=1');
Memo1.Lines.Text := idHTTP1.Post(s, PostData);
PostData.Free;
var
S:TStringList;
begin
S := TStringList.Create;
S.Add('user=', edtUser.text);
S.Add('pass=', edtPass.text);
try
HTTP.Post('http://xxxxxxxx/xxx', S);
finally
HTTP.Free;
end;
end;
strMsg:string;
sParams: TStringStream;
begin
sParams := TStringStream.create('');
IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
try
sParams.WriteString('参数1=结果&参数2=结果2') ;
strMsg:=IdHTTP1.post('http://www.xxxxx.com/add-c.asp',sParams) ;
memo1.Text:=strmsg;
finally
sParams.Free ;
end;
s := 'http://aaa.net/bbs/index.php';
if CanGetIECookie(s, str) then
begin
CookieStr := 'Cookie: ' str;
idHttp1.Request.CustomHeaders.Text := CookieStr;
end else
begin
ShowMessage('没有发现本地Cookie,请从Web页面登陆一次。');
Exit;
end;
s := 'http://aaa.net/bbs/forumdisplay.php';
PostData := TStringList.Create;
PostData.Add('fid=1');
Memo1.Lines.Text := idHTTP1.Post(s, PostData);
PostData.Free;
var
S:TStringList;
begin
S := TStringList.Create;
S.Add('user=', edtUser.text);
S.Add('pass=', edtPass.text);
try
HTTP.Post('http://xxxxxxxx/xxx', S);
finally
HTTP.Free;
end;
end;