Webbrows counterfeit cookie

Source: Internet
Author: User
Unit unit1;

Interface

Uses
Windows, messages, sysutils, variants, classes, graphics, controls, forms,
Dialogs, stdctrls, olectrls, shdocvw, mshtml, extctrls, comctrls,
Winskindata;

Type
Tform1 = Class (tform)
Skindata1: tskindata;
Edit1: tedit;
Button1: tbutton;
Label1: tlabel;
Label2: tlabel;
Checkbox1: tcheckbox;
Panel1: tpanel;
Statusbar1: tstatusbar;
Webbrowser1: twebbrowser;
Memo1: tmemo;
Procedure button1click (Sender: tobject );
Procedure webbrowser1downloadcomplete (Sender: tobject );
Procedure webbrowser1statustextchange (Sender: tobject;
Const text: widestring );
Procedure webbrowser1titlechange (Sender: tobject;
Const text: widestring );
Procedure webbrowser1beforenavigate2 (Sender: tobject;
Const Pdisp: idispatch; var URL, flags, targetframename, postdata,
Headers: olevariant; var cancel: wordbool );
Procedure edit1keypress (Sender: tobject; var key: Char );
Procedure checkbox1click (Sender: tobject );
Private
{Private Declarations}
Public
{Public declarations}
End;

VaR
Form1: tform1;

Implementation

{$ R *. DFM}

Procedure tform1.button1click (Sender: tobject );
VaR
S: ihtmldocument2;
Begin
If checkbox1.checked then
Begin
S: Required webbrowser1.doc ument as ihtmldocument2;
S. COOKIE: = memo1.text; // & icirc; ± & ocirc; others cookie
Webbrowser1.navigate (edit1.text );
End
Else
Webbrowser1.navigate (edit1.text );
End;

Procedure tform1.webbrowser1downloadcomplete (Sender: tobject );
VaR
S: ihtmldocument2;
Begin
If not checkbox1.checked then
Begin
S: Required webbrowser1.doc ument as ihtmldocument2;
Memo1.text: = S. Cookie; // & egrave; & iexcl; & micro; & atilde; cookie
Checkbox1.enabled: = true;
End;
End;

Procedure tform1.webbrowser1statustextchange (Sender: tobject;
Const text: widestring );
Begin
Statusbar1.panels [1]. Text: = text; // × & acute; & igrave; & not; & igrave; & otilde; & auml; & uacute; & egrave; & yacute;
End;

Procedure tform1.webbrowser1titlechange (Sender: tobject;
Const text: widestring );
Begin
Form1.caption: = text + '& iexcl; & ordf; kendybrowser'; // ± response & igrave; & acirc;
End;

Procedure tform1.webbrowser1beforenavigate2 (Sender: tobject;
Const Pdisp: idispatch; var URL, flags, targetframename, postdata,
Headers: olevariant; var cancel: wordbool );
Begin
Edit1.text: = URL; // & micro; & Oslash; & ouml; · & agrave; & cedil;
End;

Procedure tform1.edit1keypress (Sender: tobject; var key: Char );
VaR
S: ihtmldocument2;
Begin
If key = #13 then
Begin
If checkbox1.checked then
Begin
S: Required webbrowser1.doc ument as ihtmldocument2;
S. COOKIE: = memo1.text;
Webbrowser1.navigate (edit1.text );
End
Else
Webbrowser1.navigate (edit1.text );
End;
End;

Procedure tform1.checkbox1click (Sender: tobject );
Begin
If memo1.readonly then
Memo1.readonly: = false
Else
Memo1.readonly: = true;
End;

End.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.