怎么传没试过。
不过刚才我不停的找呀找,终于让我找到了如何取得URL的COOKIE了。[
]
是用WINDOWS API实现的:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,WinInet, ExtCtrls, StdCtrls, Buttons;
type
TForm1 = class(TForm)
Memo1: TMemo;
Panel1: TPanel;
url: TLabeledEdit;
GetCookIes: TBitBtn;
procedure GetCookIesClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.GetCookIesClick(Sender: TObject);
var
CookieData:string;
CookieSize:cardinal;
begin
try
CookieSize:=256;
Setlength(CookIeData,cookieSize);
if InternetGetCookie(PAnsiChar(url.Text),nil,PAnsiChar(CookieData),CookieSize) then begin
memo1.Lines.Add('URL >'+URL.Text);
memo1.Lines.Add('Data >'+CookIedata);
memo1.Lines.Add('Size >'+inttostr(cookiesize));
end;
except
end;
end;
end.