向CGI提交數據

向CGI提交數據
procedure TForm1.Button1Click(Sender: TObject);
var
  lUrl: string;
  lParams: TStrings;
  lHtml: string;
begin
  lUrl := 'http://snixxx.co.uk/cgi-bin/mt-comments.cgi';
  lParams := TStringList.Create;
  try
    lParams.Add('entry_id=1302');
    lParams.Add('author=dqxhyy');
    lParams.Add( '[email protected]');
    lParams.Add('dqxhyydqxhyydqxhyydqxhyy');
    try
      lHtml := IdHttp1.Post(lUrl, lParams);
    except
      showmessage(lhtml);
    end;
    showmessage(lhtml);
  finally
    lParams.Free;
  end;
end;

你可能感兴趣的:(向CGI提交數據)